Re: USB device allocation

Nathan Hand (nathanh@chirp.com.au)
Wed, 6 Oct 1999 16:09:32 +1000


On Tue, Oct 05, 1999 at 04:03:34PM -0700, H. Peter Anvin wrote:
> David Weinehall wrote:
> >
> > > That is one way of doing it; IMO a very good way because it lets you
> > > have policy in user space.
> >
> > Oh? And what kind of image of how devfs does things do you have then?
> >
> > This is how devfs works. The kernel part of devfs informs devfsd of the
> > changes (what devices need to be created/removed), and devfsd nicely
> > carries out its chores. User-space policy and persistent access-rights are
> > there for you.
> >
>
> ... in which case you don't need devfs at all.
>
> -hpa

Agreed. Getting rid of devfs (the dynamic filesystem) makes devfs (the
concept of dynamic /dev) more acceptable to more punters, and honestly
doesn't lose all that much functionality. Modules contact devfsd when
they need a node. The daemon creates/deletes nodes as needed on a real
filesystem using the policy laid out via /etc/devfsd.conf.

- The /dev directory is updated in user space, not kernel space.

- You can just turn off the daemon, old behaviour is restored.

- Kernel modifications are minimal (changes to init/cleanup_module).

- Major/minors can be assigned dynamically by drivers, avoids GUID.

- Topology rules for USB can be over-engineered totally in user space.

- The policy for naming nodes moves to user space, hpa is happy.

- Persistence of nodes is maintained by the filesystem, tso is happy.

- Devfs gets into the kernel, everyone else in the world is happy.

You lose the ability to run a Linux system without a filesystem which
knows about major/minor numbers. Only a tiny number of people are going
to complain about this (David?).

-- 
Nathan Hand - Chirp Web Design - http://www.chirp.com.au/ - $e^{i\pi}+1 = 0$
Phone: +61 2 6230 1871   Fax: +61 2 6230 1515   E-mail: nathanh@chirp.com.au

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/