[Sussex] Linux Devices [Was: kernel 2.6]
Steve Dobson
steve at dobson.org
Fri Mar 19 13:15:57 UTC 2004
Thomas
On Fri, Mar 19, 2004 at 12:37:09PM +0000, Thomas Adam wrote:
> --- Steve Dobson <steve at dobson.org> wrote:
<snip>
> > > Udev has been in existance for some time now. Of course, I am no fan
> > > of udev or its kindred, and as such am sticking with a static /dev
> > > tree. What's that? Major/minor numbers? heh, I mknod up and down...
> >
> > That is fine for "small" systems, but for those really, really, really
> > big systems with very large numbers of SCSI devices that are now coming
> > on line. It is not unknown for 4K SCSI disks to be connected. With
> > only an eight-bit minor number you have to start poaching "spare" major
> > numbers.
>
> Oh sure, but those are isolated cases.
While I would agree that they are not the most common, I would not call
them isolated [for a start those systems are normally networked <VBG>].
I want Linux to work well on IBM/Sun/HP big iron as these guys will
plow big bucks into it's development and I benefit from that.
> > Now with a lot of devices coming on line (mostly USB) we are now in a
> > position where there are more types of device than there are major
> > numbers. To see the other problems read:
> > http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev_vs_devfs
>
> Good link that.
I recommend everyone on this list to read it, there is lots of info on
devices should be the goal of everyone on this list to understand.
> > The udev/hotplug allows both for a very large number of devices as
> > well as a very large number of device instances as major, as well
> > as minor, numbers can be assigned on the fly.
>
> Sure.
>
> > I also like the idea the /dev only contains files for devices that
> > really are connected to a system. Not all possible devices that
> > could be connected.
>
> It depends what you're used to, I suppose. I still disagee shifting the
> control to userspace, but there you go...
Well how are you going to solve the real world problem then? With USB,
hotplug PCI, and God knows what else just around the corner, there is
likely to be an explosion of devices. I, for one, what Linux support of
all of them (just in case I want to play).
If you don't like the idea of dynamically assigned major & minor numbers
how are you going to increase the major/minor namespace? Increase it to
a 64-bit number?
That path (as it exists at the moment) requires a central administrator
to oversee the assignment of device types to major numbers. I am now
against such a policy. Look at the mess that DNS is in because it is
a hierarchy with centralized control. I don't want the same thing to
happen to the Linux devices name space.
De-centralized administration allows the best solution to float to the
top. Look at the binary packaging systems around and the view now that
apt is the best. We may go through some pain before we do get a "proper"
device tree, but major/minor numbers is *not* the way to do it - I don't
think they are used in Plan9, that has a much better implementation of
"everything is a file".
Steve D
More information about the Sussex
mailing list