lkml.org 
[lkml]   [1999]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: More on bigger kdev_t
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/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.091 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site