Thread (5 messages) flat view 5 messages, 2 authors, 2011-10-14

Re: [PATCH net-next] niu: fix skb truesize underestimation

From: Eric Dumazet <hidden>
Date: 2011-10-14 03:33:57

Le jeudi 13 octobre 2011 à 22:26 -0400, David Miller a écrit :
From: Eric Dumazet <redacted>
Date: Fri, 14 Oct 2011 00:39:27 +0200
quoted
Add a 'truesize' argument to niu_rx_skb_append(), filled with rcr_size
by the caller to properly account frag sizes in skb->truesize

Signed-off-by: Eric Dumazet <redacted>
---
Please David double check this one as I am not very familiar with NIU
code. Thanks !
It looks perfect!  And if it's not I'll soon find out :-)
Thanks !

By the way, I noticed NIU uses a get_page() every time a chunk is
attached to a skb (only the last chunk of a page is given without the
get_page())

So I thought it might incur false sharing if a previous SKB using a
chunk from same page is processed by another CPU.

But then I see you also do in niu_rbr_add_page(), rigth after the
alloc_page(), the thing I was thinking to add : (perform all needed
get_page() in a single shot)

atomic_add(rp->rbr_blocks_per_page - 1,
	&compound_head(page)->_count);

So I am a bit lost here. Arent you doing too many page->_count
increases ?

Thanks !
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help