Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [drm-intel/topic/core-for-CI] Revert "io_uring/sqpoll: don't attach to a thread that is canceling"
@ 2026-11-02 20:06 Umesh Nerlige Ramappa
  2026-11-02 20:16 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Umesh Nerlige Ramappa @ 2026-11-02 20:06 UTC (permalink / raw)
  To: rodrigo.vivi, intel-xe, intel-gfx; +Cc: jani.saarinen

This reverts commit 22d9db9fd64a493525d692b32c556875b7254665.

This is resulting in igt@runner@aborted on Xe and i915 runs, so
reverting the patch. The actual fix is still in flight on the kernel ML:

[PATCH] io_uring/sqpoll: don't set IO_SQ_THREAD_SHOULD_STOP on thread exit

Until that lands, revert this one.

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
References: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/17747
---
 io_uring/sqpoll.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c
index c833e776320d..49c52284ecdd 100644
--- a/io_uring/sqpoll.c
+++ b/io_uring/sqpoll.c
@@ -433,12 +433,6 @@ static int io_sq_thread(void *data)
 	if (io_sq_tw_pending())
 		io_sq_tw(UINT_MAX);
 
-	/*
-	 * Cancelation drops sqd->lock while it waits, and a ring could attach
-	 * to a thread that is on its way out. A fatal signal doesn't set the
-	 * bit, so set it here for io_sq_offload_create() to see.
-	 */
-	set_bit(IO_SQ_THREAD_SHOULD_STOP, &sqd->state);
 	io_uring_cancel_generic(true, sqd);
 	rcu_assign_pointer(sqd->thread, NULL);
 	put_task_struct(current);
@@ -508,10 +502,7 @@ __cold int io_sq_offload_create(struct io_ring_ctx *ctx,
 		list_add(&ctx->sqd_list, &sqd->ctx_list);
 		io_sqd_update_thread_idle(sqd);
 		/* don't attach to a dying SQPOLL thread, would be racy */
-		ret = 0;
-		if (attached && (!sqd->thread ||
-		    test_bit(IO_SQ_THREAD_SHOULD_STOP, &sqd->state)))
-			ret = -ENXIO;
+		ret = (attached && !sqd->thread) ? -ENXIO : 0;
 		io_sq_thread_unpark(sqd);
 
 		if (ret < 0)
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-02 23:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 20:06 [drm-intel/topic/core-for-CI] Revert "io_uring/sqpoll: don't attach to a thread that is canceling" Umesh Nerlige Ramappa
2026-11-02 20:16 ` ✓ CI.KUnit: success for " Patchwork
2026-11-02 20:17 ` [drm-intel/topic/core-for-CI] " Umesh Nerlige Ramappa
2026-11-02 21:26   ` Matt Roper
2026-11-02 23:06     ` Rodrigo Vivi
2026-11-02 20:51 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-11-02 22:56 ` ✓ Xe.CI.FULL: " Patchwork

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