linux/kernel/bpf
Hou Tao 6a5c63d43c bpf: Use raw_spinlock_t for LPM trie
After switching from kmalloc() to the bpf memory allocator, there will be
no blocking operation during the update of LPM trie. Therefore, change
trie->lock from spinlock_t to raw_spinlock_t to make LPM trie usable in
atomic context, even on RT kernels.

The max value of prefixlen is 2048. Therefore, update or deletion
operations will find the target after at most 2048 comparisons.
Constructing a test case which updates an element after 2048 comparisons
under a 8 CPU VM, and the average time and the maximal time for such
update operation is about 210us and 900us.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20241206110622.1161752-8-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2024-12-06 09:14:26 -08:00
..
preload
arena.c bpf: Do not alloc arena on unsupported arches 2024-11-15 08:10:13 -08:00
arraymap.c
bloom_filter.c
bpf_cgrp_storage.c
bpf_inode_storage.c bpf-next-bpf-next-6.13 2024-11-21 08:11:04 -08:00
bpf_iter.c
bpf_local_storage.c
bpf_lru_list.c
bpf_lru_list.h
bpf_lsm.c bpf, lsm: Remove getlsmprop hooks BTF IDs 2024-11-25 14:14:17 -08:00
bpf_struct_ops.c bpf: Add kernel symbol for struct_ops trampoline 2024-11-12 17:13:46 -08:00
bpf_task_storage.c bpf-next-bpf-next-6.13 2024-11-21 08:11:04 -08:00
btf_iter.c
btf_relocate.c
btf.c bpf: Mark raw_tp arguments with PTR_MAYBE_NULL 2024-11-04 11:37:36 -08:00
cgroup_iter.c
cgroup.c Summary 2024-11-22 20:36:11 -08:00
core.c bpf-next-bpf-next-6.13 2024-11-21 08:11:04 -08:00
cpumap.c
cpumask.c
crypto.c
devmap.c bpf: fix OOB devmap writes when deleting elements 2024-11-25 14:25:48 -08:00
disasm.c
disasm.h
dispatcher.c bpf: Add kernel symbol for struct_ops trampoline 2024-11-12 17:13:46 -08:00
hashtab.c bpf: Call free_htab_elem() after htab_unlock_bucket() 2024-11-11 08:18:30 -08:00
helpers.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2024-11-13 12:52:51 -08:00
inode.c
Kconfig
kmem_cache_iter.c bpf: Add open coded version of kmem_cache iterator 2024-11-01 11:08:32 -07:00
link_iter.c
local_storage.c
log.c
lpm_trie.c bpf: Use raw_spinlock_t for LPM trie 2024-12-06 09:14:26 -08:00
Makefile bpf: Introduce range_tree data structure and use it in bpf arena 2024-11-13 13:52:45 -08:00
map_in_map.c
map_in_map.h
map_iter.c
memalloc.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2024-11-13 12:52:51 -08:00
mmap_unlock_work.h
mprog.c
net_namespace.c
offload.c
percpu_freelist.c
percpu_freelist.h
prog_iter.c
queue_stack_maps.c
range_tree.c bpf: Add necessary migrate_disable to range_tree. 2024-11-15 08:11:53 -08:00
range_tree.h bpf: Introduce range_tree data structure and use it in bpf arena 2024-11-13 13:52:45 -08:00
relo_core.c
reuseport_array.c
ringbuf.c
stackmap.c
syscall.c tracing updates for v6.13: 2024-11-22 13:27:01 -08:00
sysfs_btf.c
task_iter.c vfs-6.13.file 2024-11-18 10:30:29 -08:00
tcx.c
tnum.c
token.c
trampoline.c bpf: Add kernel symbol for struct_ops trampoline 2024-11-12 17:13:46 -08:00
verifier.c bpf: Fix narrow scalar spill onto 64-bit spilled scalar slots 2024-12-04 09:19:50 -08:00