On Wed, 6 Jun 2007 14:49:43 +0200, Oliver Neukum <[EMAIL PROTECTED]> wrote:

> Here's a patch to reduce padding:

So, sizeofs are:
original:              160
with anchor:           184
with the patch:        176

So, this does not win us back the space used for the anchor. We are
still 16 bytes down, or about 10%.

There's something you said in this thread which I would like to address.

> > So, you add 24 bytes to all URBs, which are... not very thin, to be sure.
> > Last time I counted they were 152 bytes apiece. Still, a 15% increase.
> > I know you're a good algorithmist, are you sure you don't have any ideas?
> 
> I figured the URB will end up in the same buckets for SLAB anyway due to
> granularity.

This is true, except for legacy cases (such as ub), where URBs are
embedded into other objects. This relies on them not being ISO and
thus being embeddable. But majority is allocated dynamically and all
of them will be eventually. So, what do you think about moving the
ISO descriptors out of line, and then allocating URBs out of a slab?
Such a move would save tons on external fragmentation, enough for
anchors and more.

> Why do you care that much about the size of struct urb? There are a few
> hundred of these structures at most at any given time. I think we gain more
> in memory usage if we make using URBs easier, shrinking drivers' code.

Firstly, we certainly are reasoning without data here. Your hunch that
we'll win anything in driver code is not any better substantiated than
my hunch that URBs are too big and cause memory pressure in unfortunate
moments (otherwise, why does usb-storage continue to lock up with
write throttling issues, but ub works in same tests).

So, another reason why I like the slab is because it tells us how many
are around.

-- Pete

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to