Re: devfs

Albert D. Cahalan (acahalan@cs.uml.edu)
Sun, 11 Jan 1998 00:32:56 -0500 (EST)


Stephen Harris writes:
> Michael Neuffer (neuffer@goofy.zdv.Uni-Mainz.de) wrote:
>> On Thu, 8 Jan 1998, Albert D. Cahalan wrote:

>>> Sanity check time! Let's see if your "fix" would work.
>
> Yes, let's have one..
>
>>> bus 4 bits
>
> 16 controllers. OK...

I'm thinking 4 cards with 4 busses on each card.

>>> unit 8 bits
>
> 256 devices per controller? SCSI??? Really? Wow!

Yes, really. It is fiber optic too, available on serious hardware.
This isn't something you buy at Walmart. We'd need to allow for the
maximum, even though the actual device use will be sparse.

>>> LUN 8 bits
>
> 256 LUN's per SCSI ID? Gosh! 2.0.33 has 7 or 8 or 32 (depending on the
> driver).

Yes, available on some very expensive workstations.

>>> partition 6 bits
>
> 64 partitions per disk? Yikes! Few commercial OS's have that many
> partitions per disk (Solaris allows 8), but OK... lets have 64 partitions.

Linux supports 63 partitions on IDE disks. Sometimes I see complaints
about the 15 partition limit on SCSI disks. The limit is only there
because of the 8-bit minor number currently in use.

> And Mike's comments...
>
>> And that is only for one controller. Now imagine having several of them.
>> A 12GB or even larger root partition would be real fun.
>
> Yup. Great sanity check. Let me help you into this long shirt which
> does up at the back...

Actually, I forgot about the inodes! Including the inodes,
we'd have 36 to 72 GB for /dev alone. That is silly.

> Now, 16 controllers, 16 units (wide SCSI), 32 LUNs, 64 partitions makes
> 4 bits + 4 bits + 5 bits + 6 bits = 19 bits

No, you _must_ support more LUNs and ought to support more units.

> Of course, _sane_ user space boot programs (such as those used in
> Solaris or HPUX) to check and rebuild /dev on request (Solaris)
> or at each boot (HPUX) would allow us to use 24 bit minor numbers,
> have a sufficiently small /dev *AND* work. No /devfs required!

People have already pointed out problems with the Solaris method.

> This is a USER SPACE problem, and not a kernel space one.

Even if SCSI could be solved in user-space, there is the issue
of a read-only /dev and other problems. Device files are really
an interface to the kernel, just like /proc/cpuinfo is.