Thread (16 messages) 16 messages, 3 authors, 2012-02-01

Re: [PATCH v3 1/6] net: pad skb data and shinfo as a whole rather than individually

From: Eric Dumazet <hidden>
Date: 2012-01-25 12:51:23

Le mercredi 25 janvier 2012 à 12:27 +0000, Ian Campbell a écrit :
This reduces the minimum overhead required for this allocation such that the
shinfo can be grown in the following patch without overflowing 2048 bytes for a
1500 byte frame.

Reducing this overhead while also growing the shinfo means that sometimes the
tail end of the data can end up in the same cache line as the beginning of the
shinfo. Specifically in the case of the 64 byte cache lines on a 64 bit system
the first 8 bytes of shinfo can overlap the tail cacheline of the data. In many
cases the allocation slop means that there is no overlap.

Signed-off-by: Ian Campbell <redacted>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <redacted>
---
Hmm... you missed build_skb() and all places we use
SKB_DATA_ALIGN(sizeof(struct skb_shared_info))

(for example in some drivers)

If you want to see possible performance impact of your changes, see
commit e52fcb2462ac (bnx2x: uses build_skb() in receive path), and
expect a drop from 820.000 pps to 720.000 pps
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help