Thread (9 messages) flat view 9 messages, 4 authors, 2012-07-12

Re: [PATCH 2/2] net: Update alloc frag to reduce get/put page usage and recycle pages

From: Eric Dumazet <hidden>
Date: 2012-07-12 00:29:31

On Wed, 2012-07-11 at 17:18 -0700, Alexander Duyck wrote:
This patch does several things.

First it reorders the netdev_alloc_frag code so that only one conditional
check is needed in most cases instead of 2.

Second it incorporates the atomic_set and atomic_sub_return logic from an
earlier proposed patch by Eric Dumazet allowing for a reduction in the
get_page/put_page overhead when dealing with frags.

Finally it also incorporates the page reuse code so that if the page count
is dropped to 0 we can just reinitialize the page and reuse it.

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Alexander Duyck <redacted>
---

Hmm, I was working on a version using order-3 pages if available.

(or more exactly 32768 bytes chunks)

I am not sure how your version can help with typical 1500 allocations
(2 skbs per page)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help