Re: More on bigger kdev_t

Martin Dalecki (dalecki@cs.net.pl)
Sun, 10 Oct 1999 22:19:01 +0200


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.

Alan is right here.

I have tryed the direct approach to kdev_t several years ago out.
The lost in speed caused by introducing the strcut was really noticable
in the overall device system's performance.

It was about scary several percents. Sorry I'm not quite
sure if my memmory leaves me, but it was about as much as 3% on a
486/66MHz (Yes It was that long ago...)
And this after only folding the arrays indexed by MINOR(dev) into a
single
array of corresponding structs.

This was surely caused by the fact that after this folding the
processor cache got significantly more clobbered.

Please everybody going to hunt after kdev_t take this as a worning
that as I have said it already before: This is a task which will
have quite a big impact on the overall driver interface design :-(.

--Marcin

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