Re: [PATCH 0/2] io_uring/cancel: cancel all poll matches in one pass

From: Jens Axboe

Date: Tue Nov 03 2026 - 09:42:33 EST



On Fri, 30 Oct 2026 00:03:15 -0500, Shang En Sim wrote:
> IORING_OP_ASYNC_CANCEL with IORING_ASYNC_CANCEL_ALL cancels poll
> requests one at a time, and every lookup starts over at the beginning
> of the poll hash. Cancelled requests stay hashed until their task work
> runs, so each lookup also walks past the ones already cancelled. One
> cancel that matches K of N pending polls costs about K*N/2 visits in a
> single io_uring_enter(), with uring_lock held.
>
> [...]

Applied, thanks!

[1/2] io_uring/cancel: count all requests that a CANCEL_ALL cancels
commit: 21ddbb14f7c3baab50a2a6c13ee375edc2bbe031
[2/2] io_uring/poll: cancel all matching requests in one pass
commit: 9eff9c07e927dcd9c57150cd6fb3d4ec76f00480

Best regards,
--
Jens Axboe