summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorLiu Zhenlong <dragonliu2018@gmail.com>2026-08-19 00:35:13 +0800
committerLeon Romanovsky <leon@kernel.org>2026-09-03 11:44:44 -0400
commit15c4aa405a3dc4b874caea98b4f5db07236597ab (patch)
tree12769dd3c1b9247c0b8ee78a34623f4a5eaba11c /tools/lib/python
parent0e7d08160f6127052ef8f2093f519a748772cf6e (diff)
RDMA/rtrs-clt: use find_next_zero_bit() for permit allocation
__rtrs_get_permit() scans permits_map with find_first_zero_bit() and claims the bit with test_and_set_bit_lock(), restarting from bit 0 on a lost race. Use find_next_zero_bit() to resume from the last position so a lost race does not rescan the already-set low bits; on reaching the end, wrap to the beginning to exhaust the map. Compile-tested: arm64 defconfig + INFINIBAND_RTRS_CLIENT=m, rtrs-clt.o Reviewed-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Liu Zhenlong <dragonliu2018@gmail.com> Link: https://patch.msgid.link/20260818163513.53875-1-dragonliu2018@gmail.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions