Re: [PATCH bpf-next] xsk: introduce padding between ring pointers

2020-10-12 Thread Daniel Borkmann
On 10/12/20 1:13 PM, Magnus Karlsson wrote: [...] Nope, that was a bad idea. After measuring, this one produces worse performance than the original suggestion with padding in between all members. Cannot explain why at the moment, but the numbers are convincing and above noise level for sure. So l

Re: [PATCH bpf-next] xsk: introduce padding between ring pointers

2020-10-12 Thread Magnus Karlsson
On Mon, Oct 12, 2020 at 11:37 AM Magnus Karlsson wrote: > > On Mon, Oct 12, 2020 at 10:37 AM Magnus Karlsson > wrote: > > > > On Fri, Oct 9, 2020 at 5:03 PM Daniel Borkmann wrote: > > > > > > On 10/8/20 4:12 PM, Magnus Karlsson wrote: > > > > From: Magnus Karlsson > > > > > > > > Introduce one

Re: [PATCH bpf-next] xsk: introduce padding between ring pointers

2020-10-12 Thread Magnus Karlsson
On Mon, Oct 12, 2020 at 10:37 AM Magnus Karlsson wrote: > > On Fri, Oct 9, 2020 at 5:03 PM Daniel Borkmann wrote: > > > > On 10/8/20 4:12 PM, Magnus Karlsson wrote: > > > From: Magnus Karlsson > > > > > > Introduce one cache line worth of padding between the producer and > > > consumer pointers

Re: [PATCH bpf-next] xsk: introduce padding between ring pointers

2020-10-12 Thread Magnus Karlsson
On Fri, Oct 9, 2020 at 5:03 PM Daniel Borkmann wrote: > > On 10/8/20 4:12 PM, Magnus Karlsson wrote: > > From: Magnus Karlsson > > > > 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 w

Re: [PATCH bpf-next] xsk: introduce padding between ring pointers

2020-10-09 Thread Daniel Borkmann
On 10/8/20 4:12 PM, Magnus Karlsson wrote: From: Magnus Karlsson 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

[PATCH bpf-next] xsk: introduce padding between ring pointers

2020-10-08 Thread Magnus Karlsson
From: Magnus Karlsson 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 performa