Subject: Re: Port independent cdevsw[]
To: Greywolf <>
From: Matthew Orgass <>
List: tech-kern
Date: 10/20/2000 18:16:38
On Thu, 19 Oct 2000, Greywolf wrote:
> The idea behind doing numbers and device switches is that referencing
> things through an array is typically much faster than doing a string
> match.

  That would be true if you could just divine the device number whenever
you need it.  However, you need to first do the name lookup in the file
system *then* translate based on the number, so you are actually just
adding a step.  After that you access it by fd anyway.

> The whole idea of dev_t things and /dev in the first place was that
> the dev_t was the only way by which the kernel knew what userland
> wanted.

  Right, but this was before special filesystems.  Procfs and kernfs
already make kernel data available in this way, so expanding the concept
to allow complete removal of major numbers is not much of a jump. 

Matthew Orgass