summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-11-23 16:47:33 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-11-29 08:42:42 -0800
commit0694c8f58a541d56e3c71a9cacd24155f9463702 (patch)
treeae8c8bff3520020ee2007b7d1993416ee269a687 /tools/lib/python
parent4f069ab1ec243e6b60dc438772905855c60774e8 (diff)
sched/wait: add WQ_FLAG_POLL_EXCLUSIVE for user space waiters
An exclusive waiter whose wake function returns a positive return value to indicate that it has successfully been woken up stops the wakeup walk, on the understanding that it will handle the event. However, user space consumers - like eventpoll or io_uring - want to be woken up, and want to avoid the thundering herd issue. So they used an exclusive wait - but without any actual guarantee that they will then meaningfully handle the event. So the wakeup could be lost, and real waiters would be left pending. Add a separate flag for these kind of "exclusive poll" cases, which is effectively what these user space waiters are. Only the first such entry that accepts a wakeup is woken, as now, but they don't count against nr_exclusive and it doesn't stop the walk. Wake-all (nr_exclusive == 0, including POLLFREE) still calls every entry. Reported-by: Mani Tofigh <mt4022@columbia.edu> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions