diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2019-04-12 17:07:32 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-04-18 04:09:24 +0200 |
commit | 77361825bb01ecadf3ac8622e2e4dbc28806e858 (patch) | |
tree | c521a9c061e9cc31281cc613cb9ed7b11e517286 /kernel/bpf/inode.c | |
parent | Merge branch 'af_xdp-smp_mb-fixes' (diff) | |
download | linux-77361825bb01ecadf3ac8622e2e4dbc28806e858.tar.xz linux-77361825bb01ecadf3ac8622e2e4dbc28806e858.zip |
bpf: cpumap use ptr_ring_consume_batched
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 shorten the
period and times the remote cacheline in ptr_ring is read
Batch size 8 is both to (1) limit BH-disable period, and (2) consume one
cacheline on 64-bit archs. After reducing the BH-disable section further
then we can consider changing this, while still thinking about L1 cacheline
size being active.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/inode.c')
0 files changed, 0 insertions, 0 deletions