Re: USB device allocation

danielt@digi.com
Fri, 8 Oct 1999 09:00:16 -0500 (CDT)


On Wed, 6 Oct 1999, Martin Dalecki wrote:

> danielt@digi.com wrote:
> > > You should learn to solve the problems which really arise instead of
> > > doing academic exercises.
> > >
> > OK, I'll bite. Gimme 1024 serial ports. Yesterday.
> > That is 2048 devices (standard).
> > Easy with devfs, pretty convoluted with dynamic major numbers.
>
> ? This is an academic exercise. You are not going to tell there is such
> a box
> out there? BTW if you didn't hear it before /dev/cuxx's are obsolete.
>
So they are, as of 2.3. We have customers who will not run development
phase software. Some of our customers like to run incredibly high
port densities (in a previous position here I dealt with a customer
who wanted access to hundreds of 16 port modules _from_a_single_system).

Still give me 1024 ports easily with the current structure.
Especially with devices that can be reconfigured on the fly.

> > Now: remember what the permissions were _supposed_ to be on all
> > of them after you did your "boot -r" Solaris style and lost them all.
>
> Easy, very easy indeed:
>
> ~# ls -l /dev/* > /tmp/remember (somewhere on runlevel 6 or S)
>
> and after reboot (somewhere on runlevel 1):
>
> ~# cat /tmp/remember | my_very_best_awk_code
>
Which is more or less exactly what devfsd does for devfs.
Any time you have a /dev that is dynamic _at_all_ you have
to deal with the problems that devfs has, and there are only
so many ways to do that and stay sane.

In addition devfs does away with problems of over persistence of device
nodes and permissions on them that we haven't even begun to see under
Linux, but which are fairly common under systems that commonly
use dynamic Major number allocation for drivers (SCO Openserver
for one example that I am too familiar with). Let us not follow
their example, please.


> > Real world.
>
> BTW. The code in my_very_best_awk_code will remain very simple under
> the assumption that there is no great variation between the different
> serial ports.
>
There _usually_ isn't at that kind of port count, but some
of the most demanding port densities are also the most
demanding configurations port by port.

-- 
Daniel Taylor      Senior Test Engineer     Digi International
danielt@digi.com                             Open systems win.

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