summaryrefslogtreecommitdiff
path: root/kernel/bpf/memalloc.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2022-09-02 14:10:53 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2022-09-05 15:33:06 +0200
commitee4ed53c5eb62f49f23560cc2642353547e46c32 (patch)
treeb231a358f08114c88f8a3baf34e8c0508300636b /kernel/bpf/memalloc.c
parent4ab67149f3c6e97c5c506a726f0ebdec38241679 (diff)
bpf: Convert percpu hash map to per-cpu bpf_mem_alloc.
Convert dynamic allocations in percpu hash map from alloc_percpu() to bpf_mem_cache_alloc() from per-cpu bpf_mem_alloc. Since bpf_mem_alloc frees objects after RCU gp the call_rcu() is removed. pcpu_init_value() now needs to zero-fill per-cpu allocations, since dynamically allocated map elements are now similar to full prealloc, since alloc_percpu() is not called inline and the elements are reused in the freelist. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20220902211058.60789-12-alexei.starovoitov@gmail.com
Diffstat (limited to 'kernel/bpf/memalloc.c')
0 files changed, 0 insertions, 0 deletions