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
    From: Alan Cox <alan@lxorguk.ukuu.org.uk>

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

I think you'll find that the pointer code is faster than the current code.
Each time the pointer is dereferenced is to get something we want.

For example, where the code today has
blksize_size[MAJOR(dev)][MINOR(dev)]
the new code has
dev->blksize

Much faster, much more elegant.

-
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.033 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site