Re: [PATCH bpf-next 1/5] bpf: cpumap use ptr_ring_consume_batched

2019-04-11 Thread Song Liu
On Thu, Apr 11, 2019 at 4:23 AM Jesper Dangaard Brouer wrote: > > On Wed, 10 Apr 2019 16:24:37 -0700 > Song Liu wrote: > > > > /* Feedback loop via tracepoint */ > > > - trace_xdp_cpumap_kthread(rcpu->map_id, processed, drops, > > > sched); > > > + tra

Re: [PATCH bpf-next 1/5] bpf: cpumap use ptr_ring_consume_batched

2019-04-11 Thread Jesper Dangaard Brouer
On Wed, 10 Apr 2019 16:24:37 -0700 Song Liu wrote: > > /* Feedback loop via tracepoint */ > > - trace_xdp_cpumap_kthread(rcpu->map_id, processed, drops, > > sched); > > + trace_xdp_cpumap_kthread(rcpu->map_id, n, drops, sched); > > btw: can we do th

Re: [PATCH bpf-next 1/5] bpf: cpumap use ptr_ring_consume_batched

2019-04-10 Thread Song Liu
On Wed, Apr 10, 2019 at 6:03 AM Jesper Dangaard Brouer wrote: > > Move ptr_ring dequeue outside loop, that allocate SKBs and calls network > stack, as these operations that can take some time. The ptr_ring is a > communication channel between CPUs, where we want to reduce/limit any > cacheline bou

[PATCH bpf-next 1/5] bpf: cpumap use ptr_ring_consume_batched

2019-04-10 Thread Jesper Dangaard Brouer
Move ptr_ring dequeue outside loop, that allocate SKBs and calls network stack, as these operations that can take some time. The ptr_ring is a communication channel between CPUs, where we want to reduce/limit any cacheline bouncing. Do a concentrated bulk dequeue via ptr_ring_consume_batched, to s