Re: devfs again, (was RE: USB device allocation)

Stephen Frost (sfrost@ns.snowman.net)
Mon, 11 Oct 1999 13:19:50 -0400 (EDT)


On Mon, 11 Oct 1999, Bernhard Rosenkraenzer wrote:

> On Thu, 7 Oct 1999, Horst von Brand wrote:
>
> > /dev is in the _filesystem_, and can be kept there.
>
> can: yes.
> must: not really, why not try a different approach if there are
> arguments for it?
>
> "It has always been that way" is NOT a reason for "it must always stay
> that way".

Other arguments have been brought up against it (persistance, more
work in kernel memory, others).

> Enjoy running rm and mknod whenever you insert a PCMCIA or USB device...
> And of course let's not forget about newbie users who want their
> StarOffice and who don't worry about system internals such as any /dev
> entries? Like it or not, Linux is going to make it to the desktop market,
> and thereby to users who don't have a clue.
> For them, devfs is more important than for us.

Dynamic /dev is important to them, as is user-notification of device
addition/removal. This is not the same as devfs, devfs is one implementation
of this.

> Really? Plug in an USB CD drive or a PCMCIA network card, and mount it
> without maintaining /dev, unless you want to keep around tons of unused
> /dev entries all the time.

No, you let some nice user-space program handle dealing with /dev for
those devices. So long as the kernel can notify the userland program and
provide it the information it needs (Or a way to get it), this should work
nicely.

> What is the extra cost, if you set CONFIG_DEVFS=n ?

Driver developers having to support devfs, and possibly major,minor's
as well. The problem is, if you only go half-way you loose one of the (to me)
big advantages of devfs, getting rid of major,minor's in favor of something
(arguably) more scalable. As in, if you have to have your drivers support both
it takes away one of devfs's advantages. If you allow CONFIG_DEVFS=n, then you
MUST support major,minor's.

> Have you heard of automount? It was originally meant to mount NFS volumes
> when required, but it can (and actually has been) used for other stuff as
> well.
> For example, it can be used to automatically mount CDs when they're
> inserted, or to mount new partitions when they appear in devfs...

The same can be done from userspace with appropriate kernel
notification...

Stephen

-
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/