public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] io_uring: signal SQPOLL task_work with TWA_SIGNAL_NO_IPI
@ 2024-06-25  1:45 Jens Axboe
  0 siblings, 0 replies; only message in thread
From: Jens Axboe @ 2024-06-25  1:45 UTC (permalink / raw)
  To: io-uring

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]>

diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 7ed1e009aaec..4e2836c9b7bf 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1209,8 +1209,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;
 	}
 
-- 
Jens Axboe


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-25  1:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25  1:45 [PATCH] io_uring: signal SQPOLL task_work with TWA_SIGNAL_NO_IPI Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox