Oleg Nesterov 7a166094bd 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
2024-10-07 09:28:45 +02:00
..
2024-10-07 09:28:45 +02:00
2024-06-15 10:43:06 -07:00
2024-09-23 12:47:06 -07:00
2024-09-29 08:51:30 -07:00
2024-09-28 09:06:15 -07:00
2024-09-19 10:18:15 +02:00
2024-09-17 07:25:37 +02:00
2024-07-29 10:45:54 -07:00
2024-09-03 21:15:26 -07:00
2024-09-19 10:18:15 +02:00
2023-12-01 09:51:44 -08:00
2024-09-27 08:18:43 -07:00
2023-12-29 12:22:29 -08:00
2024-07-18 12:19:20 -07:00
2024-05-30 15:31:38 -07:00
2024-05-17 17:31:24 -07:00
2024-09-18 06:59:44 +02:00