Skip to contentSkip to conversation

io_uring: signal SQPOLL task_work with TWA_SIGNAL_NO_IPI

PATCH New Jens Axboe 1 participant 1 message Jun 25, 2024 io_uring

lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

PATCH 1/1 io_uring: signal SQPOLL task_work with TWA_SIGNAL_NO_IPI

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")
io_uring/io_uring.c +2 -2
index 7ed1e009aaec..4e2836c9b7bf 100644
@@ -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;
 	}
 
Signature · 1 line
Jens Axboe