[PATCH bpf-next v1 0/3] Use kmalloc_nolock() universally in BPF local storage

Amery Hung
2026-04-11T00:17:14Z

Socket local storage did not convert to use kmalloc_nolock() since there
were observable performance degredation due to kfree_nolock() hitting the
slow path and the lack of kfree_rcu()-like batching freeing. Now that
these concern were addressed in slub, convert all remaining local storage
flavors to use kmalloc_nolock().

Amery Hung (3):
selftests/bpf: Remove kmalloc tracing from local storage create bench
bpf: Use kmalloc_nolock() universally in local storage
bpf: Remove gfp_flags plumbing from bpf_local_storage_update()

include/linux/bpf_local_storage.h | 15 +-
kernel/bpf/bpf_cgrp_storage.c | 11 +-
kernel/bpf/bpf_inode_storage.c | 11 +-
kernel/bpf/bpf_local_storage.c | 146 +++---------------
kernel/bpf/bpf_task_storage.c | 11 +-
kernel/bpf/verifier.c | 26 ----
net/core/bpf_sk_storage.c | 19 +--
.../bpf/benchs/bench_local_storage_create.c | 21 +--
.../bpf/progs/bench_local_storage_create.c | 11 --
9 files changed, 55 insertions(+), 216 deletions(-)

--
2.52.0