Re: [PATCH] io_uring/sqpoll: do the return-to-userspace work in the SQPOLL thread

From: Jens Axboe

Date: Tue Nov 03 2026 - 09:40:46 EST



On Sat, 31 Oct 2026 19:21:46 -0700, Shakeel Butt wrote:
> The SQPOLL thread never returns to userspace. io_sq_tw() runs its
> task_work, but the rest of resume_user_mode_work(), like memory.high
> reclaim and block cgroup throttling, only runs when the thread exits.
> So memory.high reclaim only happens inside a charge, with sqd->lock and
> ctx->uring_lock held, and not at all if the charges can't block.
>
> This used to work. The loop called io_run_task_work(), which does this
> work since commit b5d3ae202fbf ("io_uring: handle TIF_NOTIFY_RESUME
> when checking for task_work"). Commit af5d68f8892f ("io_uring/sqpoll:
> manage task_work privately") replaced that call with io_sq_tw().
>
> [...]

Applied, thanks!

[1/1] io_uring/sqpoll: do the return-to-userspace work in the SQPOLL thread
commit: f013b695506491c5202a412a6568313549c81f50

Best regards,
--
Jens Axboe