summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/skb_load_bytes.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2024-10-01 16:24:59 +0200
committerPeter Zijlstra <peterz@infradead.org>2024-10-07 09:28:45 +0200
commit7a166094bd2b1c084fd215747f9cd05a853d66c9 (patch)
tree01da11ab3a925931f2ba3ebd3a7eed3498903853 /tools/testing/selftests/bpf/prog_tests/skb_load_bytes.c
parentc16e2fdd746c78f5b2ce3c2ab8a26a61b6ed09e5 (diff)
uprobes: kill xol_area->slot_count
Add the new helper, xol_get_slot_nr() which does find_first_zero_bit() + test_and_set_bit(). xol_take_insn_slot() can wait for the "xol_get_slot_nr() < UINSNS_PER_PAGE" event instead of "area->slot_count < UINSNS_PER_PAGE". So we can kill area->slot_count and avoid atomic_inc() + atomic_dec(), this simplifies the code and can slightly improve the performance. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20241001142458.GA13629@redhat.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/skb_load_bytes.c')
0 files changed, 0 insertions, 0 deletions