]> Git Repo - J-linux.git/commitdiff
io_uring: signal SQPOLL task_work with TWA_SIGNAL_NO_IPI
authorJens Axboe <[email protected]>
Tue, 25 Jun 2024 01:07:18 +0000 (19:07 -0600)
committerJens Axboe <[email protected]>
Tue, 25 Jun 2024 01:46:15 +0000 (19:46 -0600)
Before SQPOLL was transitioned to managing its own task_work, the core
used TWA_SIGNAL_NO_IPI to ensure that task_work was processed. If not,
we can't be sure that all task_work is processed at SQPOLL thread exit
time.

Fixes: af5d68f8892f ("io_uring/sqpoll: manage task_work privately")
Cc: [email protected]
Signed-off-by: Jens Axboe <[email protected]>
io_uring/io_uring.c

index 154b25b8a613b16ad7c07fb590ad74b379447fb5..c326e2127dd4dd7fff32fe41a4d6d3979162cf4d 100644 (file)
@@ -1259,8 +1259,8 @@ static void io_req_normal_work_add(struct io_kiocb *req)
        if (ctx->flags & IORING_SETUP_SQPOLL) {
                struct io_sq_data *sqd = ctx->sq_data;
 
-               if (wq_has_sleeper(&sqd->wait))
-                       wake_up(&sqd->wait);
+               if (sqd->thread)
+                       __set_notify_signal(sqd->thread);
                return;
        }
 
This page took 0.051742 seconds and 4 git commands to generate.