summaryrefslogtreecommitdiff
path: root/certs
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2022-09-02 14:10:57 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2022-09-05 15:33:07 +0200
commitbfc03c15bebf5e0028e21ca5fc0fe4a60a6b6681 (patch)
tree48a88881f31da2404ee51871c6e57869ee9ccf62 /certs
parent02cc5aa29e8cef4c1d710accd423546ab63f4eda (diff)
bpf: Remove usage of kmem_cache from bpf_mem_cache.
For bpf_mem_cache based hash maps the following stress test: for (i = 1; i <= 512; i <<= 1) for (j = 1; j <= 1 << 18; j <<= 1) fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, i, j, 2, 0); creates many kmem_cache-s that are not mergeable in debug kernels and consume unnecessary amount of memory. Turned out bpf_mem_cache's free_list logic does batching well, so usage of kmem_cache for fixes size allocations doesn't bring any performance benefits vs normal kmalloc. Hence get rid of kmem_cache in bpf_mem_cache. That saves memory, speeds up map create/destroy operations, while maintains hash map update/delete performance. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20220902211058.60789-16-alexei.starovoitov@gmail.com
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions