diff options
author | tom.leiming@gmail.com <tom.leiming@gmail.com> | 2015-12-29 22:40:27 +0800 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2022-04-19 00:49:53 +0300 |
commit | 99ca4c863fad2090138699d69cb9a54f18cdd962 (patch) | |
tree | 7baa3d8e47429e93702d05a19de8a808a65d9e78 /kernel/bpf/arraymap.c | |
parent | 27182c89d1a2bd1c787509736d354729febbd3fa (diff) |
bpf: hash: use per-bucket spinlock
Both htab_map_update_elem() and htab_map_delete_elem() can be
called from eBPF program, and they may be in kernel hot path,
so it isn't efficient to use a per-hashtable lock in this two
helpers.
The per-hashtable spinlock is used for protecting bucket's
hlist, and per-bucket lock is just enough. This patch converts
the per-hashtable lock into per-bucket spinlock, so that
contention can be decreased a lot.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions