aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2024-10-01 14:24:59 +0000
committerPeter Zijlstra <[email protected]>2024-10-07 07:28:45 +0000
commit7a166094bd2b1c084fd215747f9cd05a853d66c9 (patch)
tree01da11ab3a925931f2ba3ebd3a7eed3498903853 /tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c
parentuprobes: deny mremap(xol_vma) (diff)
downloadkernel-7a166094bd2b1c084fd215747f9cd05a853d66c9.tar.gz
kernel-7a166094bd2b1c084fd215747f9cd05a853d66c9.zip
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 <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c')
0 files changed, 0 insertions, 0 deletions