Re: devfs

Michael O'Reilly (michael@metal.iinet.net.au)
09 Jan 1998 13:01:11 +0800


"Albert D. Cahalan" <acahalan@cs.uml.edu> writes:
> > Laugh. Think 'caching' which is done right now for the current
> > scheme. Even 1000 people logged in for 2000 inodes is a trivial
> > number of inodes.
>
> Hmmm, a 64 kB /dev with linear ext2 searching. Ouch.
> But that isn't as bad as it gets when you add SCSI.

You clearly don't understand what's going on here. The directory
search is _only_ done for a filename lookup. I.e. at the moment, only
when someone logs in. After that the tty is referenced by
inode. Updates are in-memory, and at very very low cost.

> > Posix complient means nothing. Go and see what you actually need to
> > make posix. It's bugger all. Certainly not a terribly useful system.
> >
> > pty's aren't minimal posix to start with, ditto devices!
>
> Yes, which is why an NTFS system requires a devfs. I guess you agree.

Why stop at devices? What about unix pipes? what about hard links? The
fact that NTFS is missing a bunch of features means NTFS has a
problem. Why muck up the rest of the kernel because of NTFS
limitations.

As a sanity check: How many people would seriously want to run NTFS as
root filesystem?

> > This isn't an argument for devfs. This is an argument for a larger
> > dev_t size. Before you can claim this as a reason for building a
> > devfs, you need to detail exactly how a devfs is magically going to
> > fix the above problem.
>
> Sanity check time! Let's see if your "fix" would work.
>
> bus 4 bits
> unit 8 bits
> LUN 8 bits
> partition 6 bits
> raw/cook/etc 2 bits
>
> Fine, /dev will be 4 to 8 GB. The linear search will be fun!
> Seriously, a larger dev_t will _not_ fix this problem.

This is truely nonsense. You don't need to create every possible
device. Even in the current scheme, most people don't have a /dev/sdf*
in there.

You create the devices you need. It isn't terrible hard!

So far, the only reasons I've seen for a devfs are:
#1. NTFS doesn't have devices.
#2. Some people want fixed scsi device numbering.
#3. Ptys are a bit of a kludge, and people would like to be
able to securely use them w/o being root.

#1 is furphy.
#2 There already exists a working solution for this in userspace. Find
it and use it!
#3 ptys need a better fix than a devfs kludge. They don't really
belong in the device space anyway, more the unix pipe space.

Michael.