aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2011-11-14 06:05:34 +0000
committerDavid S. Miller <[email protected]>2011-11-14 14:13:30 -0500
commite52fcb2462ac484e6dd6e68869536609f0216938 (patch)
tree794407ff242481d5d09e3e669cabfe129d80f6df /tools/perf/scripts/python
parentb2b5ce9d1ccf1c45f8ac68e5d901112ab76ba199 (diff)
bnx2x: uses build_skb() in receive path
bnx2x uses following formula to compute its rx_buf_sz : dev->mtu + 2*L1_CACHE_BYTES + 14 + 8 + 8 + 2 Then core network adds NET_SKB_PAD and SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) Final allocated size for skb head on x86_64 (L1_CACHE_BYTES = 64, MTU=1500) : 2112 bytes : SLUB/SLAB round this to 4096 bytes. Since skb truesize is then bigger than SK_MEM_QUANTUM, we have lot of false sharing because of mem_reclaim in UDP stack. One possible way to half truesize is to reduce the need by 64 bytes (2112 -> 2048 bytes) Instead of allocating a full cache line at the end of packet for alignment, we can use the fact that skb_shared_info sits at the end of skb->head, and we can use this room, if we convert bnx2x to new build_skb() infrastructure. skb_shared_info will be initialized after hardware finished its transfert, so we can eventually overwrite the final padding. Using build_skb() also reduces cache line misses in the driver, since we use cache hot skb instead of cold ones. Number of in-flight sk_buff structures is lower, they are recycled while still hot. Performance results : (820.000 pps on a rx UDP monothread benchmark, instead of 720.000 pps) Signed-off-by: Eric Dumazet <[email protected]> CC: Eilon Greenstein <[email protected]> CC: Ben Hutchings <[email protected]> CC: Tom Herbert <[email protected]> CC: Jamal Hadi Salim <[email protected]> CC: Stephen Hemminger <[email protected]> CC: Thomas Graf <[email protected]> CC: Herbert Xu <[email protected]> CC: Jeff Kirsher <[email protected]> Acked-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions