Re: More on bigger kdev_t

Jeff Garzik (jgarzik@pobox.com)
Sun, 10 Oct 1999 16:38:32 -0400


Alan Cox wrote:
>
> > > The kernel makes quite heavy use of kdev_t. That means carrying around
> > > expensive to handle multi-register objects is right out
> >
> > ... so that would mean we should use a pointer to the structure
> > instead of directly passing the structure.
>
> That means a pointer dereference and a potential cache miss every time.

So what is the best solution?

If it is a pointer, you can store other device info besides major/minor
in the struct, eliminating the need to scan arrays of such information
indexed by major/minor.

IMHO, if kdev_t is unsigned long, you get larger major/minors on 32-bit
and 64-bit platforms, while still only carrying around a "machine int".

Jeff

-- 
Custom driver development	|    Never worry about theory as long
Open source programming		|    as the machinery does what it's
				|    supposed to do.  -- R. A. Heinlein

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