Re: [PATCH v6 12/12] net/mlx4_en: add prefetch in xdp rx path

2016-07-11 Thread Jesper Dangaard Brouer
On Sun, 10 Jul 2016 15:50:10 -0500 Tom Herbert wrote: > > This particular patch in the series is meant to be standalone exactly > > for this reason. I don't pretend to assert that this optimization will > > work for everybody, or even for a future version of me with different > > hardware. But, i

Re: [PATCH v6 12/12] net/mlx4_en: add prefetch in xdp rx path

2016-07-10 Thread Tom Herbert
> This particular patch in the series is meant to be standalone exactly > for this reason. I don't pretend to assert that this optimization will > work for everybody, or even for a future version of me with different > hardware. But, it passes my internal criteria for usefulness: > 1. It provides a

Re: [PATCH v6 12/12] net/mlx4_en: add prefetch in xdp rx path

2016-07-10 Thread Tom Herbert
On Fri, Jul 8, 2016 at 11:49 AM, Brenden Blanco wrote: > On Fri, Jul 08, 2016 at 08:56:45AM +0200, Eric Dumazet wrote: >> On Thu, 2016-07-07 at 21:16 -0700, Alexei Starovoitov wrote: >> >> > I've tried this style of prefetching in the past for normal stack >> > and it didn't help at all. >> >> Thi

Re: [PATCH v6 12/12] net/mlx4_en: add prefetch in xdp rx path

2016-07-08 Thread Brenden Blanco
On Fri, Jul 08, 2016 at 08:56:45AM +0200, Eric Dumazet wrote: > On Thu, 2016-07-07 at 21:16 -0700, Alexei Starovoitov wrote: > > > I've tried this style of prefetching in the past for normal stack > > and it didn't help at all. > > This is very nice, but my experience showed opposite numbers. > S

Re: [PATCH v6 12/12] net/mlx4_en: add prefetch in xdp rx path

2016-07-08 Thread Jesper Dangaard Brouer
On Fri, 08 Jul 2016 05:56:31 +0200 Eric Dumazet wrote: > On Thu, 2016-07-07 at 19:15 -0700, Brenden Blanco wrote: > > XDP programs read and/or write packet data very early, and cache miss is > > seen to be a bottleneck. > > > > Add prefetch logic in the xdp case 3 packets in the future. Throughp

Re: [PATCH v6 12/12] net/mlx4_en: add prefetch in xdp rx path

2016-07-07 Thread Eric Dumazet
On Thu, 2016-07-07 at 21:16 -0700, Alexei Starovoitov wrote: > I've tried this style of prefetching in the past for normal stack > and it didn't help at all. This is very nice, but my experience showed opposite numbers. So I guess you did not choose the proper prefetch strategy. prefetching in m

Re: [PATCH v6 12/12] net/mlx4_en: add prefetch in xdp rx path

2016-07-07 Thread Alexei Starovoitov
On Fri, Jul 08, 2016 at 05:56:31AM +0200, Eric Dumazet wrote: > On Thu, 2016-07-07 at 19:15 -0700, Brenden Blanco wrote: > > XDP programs read and/or write packet data very early, and cache miss is > > seen to be a bottleneck. > > > > Add prefetch logic in the xdp case 3 packets in the future. Thr

Re: [PATCH v6 12/12] net/mlx4_en: add prefetch in xdp rx path

2016-07-07 Thread Eric Dumazet
On Thu, 2016-07-07 at 19:15 -0700, Brenden Blanco wrote: > XDP programs read and/or write packet data very early, and cache miss is > seen to be a bottleneck. > > Add prefetch logic in the xdp case 3 packets in the future. Throughput > improved from 10Mpps to 12.5Mpps. LLC misses as reported by p

[PATCH v6 12/12] net/mlx4_en: add prefetch in xdp rx path

2016-07-07 Thread Brenden Blanco
XDP programs read and/or write packet data very early, and cache miss is seen to be a bottleneck. Add prefetch logic in the xdp case 3 packets in the future. Throughput improved from 10Mpps to 12.5Mpps. LLC misses as reported by perf stat reduced from ~14% to ~7%. Prefetch values of 0 through 5