All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Chris Mason <mason@kernel.org>
Cc: void@manifault.com, arighi@nvidia.com, changwoo@igalia.com,
	sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 sched_ext/for-7.4-fixes] sched_ext: Don't skip NONE tasks in sched_ext_dead()
Date: Fri, 04 Dec 2026 05:37:07 -1000	[thread overview]
Message-ID: <6aabb6d7293b3ecd8a6eb97edff93d92@kernel.org> (raw)
In-Reply-To: <20261204091840.14930-1-mason@kernel.org>

Applied to sched_ext/for-7.4-fixes with the following changes:

- The rq locking in sched_ext_dead() converted to
  scoped_guard(task_rq_lock).
- Cc: stable@vger.kernel.org # v7.1+ added.

--- a/kernel/sched/ext/ext.c
+++ b/kernel/sched/ext/ext.c
@@ -5032,9 +5032,6 @@ static bool task_dead_and_done(struct task_struct *p)

 void sched_ext_dead(struct task_struct *p)
 {
-	struct rq_flags rf;
-	struct rq *rq;
-
 	/*
 	 * By the time control reaches here, @p has %TASK_DEAD set, switched out
 	 * for the last time and then dropped the rq lock - task_dead_and_done()
@@ -5070,11 +5067,11 @@ void sched_ext_dead(struct task_struct *p)
 	 * into ops; transition to %DEAD so the post-init recheck unwinds
 	 * via scx_sub_init_cancel_task().
 	 */
-	rq = task_rq_lock(p, &rf);
-	if (scx_get_task_state(p) != SCX_TASK_INIT_BEGIN)
-		scx_disable_and_exit_task(scx_task_sched(p), p);
-	scx_set_task_state(p, SCX_TASK_DEAD);
-	task_rq_unlock(rq, p, &rf);
+	scoped_guard(task_rq_lock, p) {
+		if (scx_get_task_state(p) != SCX_TASK_INIT_BEGIN)
+			scx_disable_and_exit_task(scx_task_sched(p), p);
+		scx_set_task_state(p, SCX_TASK_DEAD);
+	}
 }

 static void reweight_task_scx(struct rq *rq, struct task_struct *p,

Thanks.

--
tejun

      reply	other threads:[~2026-12-04 15:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 14:34 [PATCH v2 sched_ext/for-7.4-fixes] sched_ext: Don't skip NONE tasks in sched_ext_dead() Chris Mason
2026-12-04 15:37 ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6aabb6d7293b3ecd8a6eb97edff93d92@kernel.org \
    --to=tj@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@kernel.org \
    --cc=sched-ext@lists.linux.dev \
    --cc=void@manifault.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.