Sqthread may be waken up because of task_work added, since we are now heavily using task_work, let's run it as soon as possible. Signed-off-by: Hao Xu <haoxu@xxxxxxxxxxxxxxxxx> --- fs/io_uring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/io_uring.c b/fs/io_uring.c index c3bd2b3fc46b..8172f5f893ad 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -6962,6 +6962,8 @@ static int io_sq_thread(void *data) } finish_wait(&sqd->wait, &wait); + if (current->task_works) + io_run_task_work(); timeout = jiffies + sqd->sq_thread_idle; } -- 2.24.4