]> git.baikalelectronics.ru Git - kernel.git/commit
xsk: Introduce padding between ring pointers
authorMagnus Karlsson <magnus.karlsson@intel.com>
Thu, 8 Oct 2020 14:12:18 +0000 (16:12 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 9 Oct 2020 14:35:01 +0000 (16:35 +0200)
commit220b623afebfb6a5c559be16dce92b0ee855d626
tree3e656fa260264bbc9e0f7518a030ba39d05c6e89
parenta988cfce9c6e0a54b7f407ae4fad7b15a3e76f56
xsk: Introduce padding between ring pointers

Introduce one cache line worth of padding between the producer and
consumer pointers in all the lockless rings. This so that the HW
adjacency prefetcher will not prefetch the consumer pointer when the
producer pointer is used and vice versa. This improves throughput
performance for the l2fwd sample app with 2% on my machine with HW
prefetching turned on.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/1602166338-21378-1-git-send-email-magnus.karlsson@gmail.com
net/xdp/xsk_queue.h