aboutsummaryrefslogtreecommitdiff
path: root/scripts/generate_rust_target.rs
diff options
context:
space:
mode:
authorPavel Begunkov <[email protected]>2022-11-20 16:57:42 +0000
committerJens Axboe <[email protected]>2022-11-25 06:54:46 -0700
commita26a35e9019fd70bf3cf647dcfdae87abc7bacea (patch)
tree710f2eb7d12de9e10511de73ed979cf3adb772d0 /scripts/generate_rust_target.rs
parent2f3893437a4ebf2e892ca172e9e122841319d675 (diff)
io_uring: make poll refs more robust
poll_refs carry two functions, the first is ownership over the request. The second is notifying the io_poll_check_events() that there was an event but wake up couldn't grab the ownership, so io_poll_check_events() should retry. We want to make poll_refs more robust against overflows. Instead of always incrementing it, which covers two purposes with one atomic, check if poll_refs is elevated enough and if so set a retry flag without attempts to grab ownership. The gap between the bias check and following atomics may seem racy, but we don't need it to be strict. Moreover there might only be maximum 4 parallel updates: by the first and the second poll entries, __io_arm_poll_handler() and cancellation. From those four, only poll wake ups may be executed multiple times, but they're protected by a spin. Cc: [email protected] Reported-by: Lin Ma <[email protected]> Fixes: aa43477b04025 ("io_uring: poll rework") Signed-off-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/c762bc31f8683b3270f3587691348a7119ef9c9d.1668963050.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'scripts/generate_rust_target.rs')
0 files changed, 0 insertions, 0 deletions