From: <gregkh@linuxfoundation.org>
To: arighi@nvidia.com,christian.loehle@arm.com,gregkh@linuxfoundation.org,sched-ext@lists.linux.dev,tj@kernel.org,void@manifault.com
Cc: <stable-commits@vger.kernel.org>
Subject: Patch "sched_ext: Don't kick CPUs running higher classes" has been added to the 6.18-stable tree
Date: Tue, 03 Feb 2026 17:41:49 +0100 [thread overview]
Message-ID: <2026020349-rebound-lyricist-de5e@gregkh> (raw)
In-Reply-To: <20260129092546.49128-2-christian.loehle@arm.com>
This is a note to let you know that I've just added the patch titled
sched_ext: Don't kick CPUs running higher classes
to the 6.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
sched_ext-don-t-kick-cpus-running-higher-classes.patch
and it can be found in the queue-6.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From stable+bounces-212753-greg=kroah.com@vger.kernel.org Thu Jan 29 10:26:03 2026
From: Christian Loehle <christian.loehle@arm.com>
Date: Thu, 29 Jan 2026 09:25:45 +0000
Subject: sched_ext: Don't kick CPUs running higher classes
To: stable@vger.kernel.org, tj@kernel.org
Cc: arighi@nvidia.com, void@manifault.com, sched-ext@lists.linux.dev, Christian Loehle <christian.loehle@arm.com>
Message-ID: <20260129092546.49128-2-christian.loehle@arm.com>
From: Tejun Heo <tj@kernel.org>
commit a9c1fbbd6dadbaa38c157a07d5d11005460b86b9 upstream.
When a sched_ext scheduler tries to kick a CPU, the CPU may be running a
higher class task. sched_ext has no control over such CPUs. A sched_ext
scheduler couldn't have expected to get access to the CPU after kicking it
anyway. Skip kicking when the target CPU is running a higher class.
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Christian Loehle <christian.loehle@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/sched/ext.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -5164,18 +5164,23 @@ static bool kick_one_cpu(s32 cpu, struct
{
struct rq *rq = cpu_rq(cpu);
struct scx_rq *this_scx = &this_rq->scx;
+ const struct sched_class *cur_class;
bool should_wait = false;
unsigned long flags;
raw_spin_rq_lock_irqsave(rq, flags);
+ cur_class = rq->curr->sched_class;
/*
* During CPU hotplug, a CPU may depend on kicking itself to make
- * forward progress. Allow kicking self regardless of online state.
+ * forward progress. Allow kicking self regardless of online state. If
+ * @cpu is running a higher class task, we have no control over @cpu.
+ * Skip kicking.
*/
- if (cpu_online(cpu) || cpu == cpu_of(this_rq)) {
+ if ((cpu_online(cpu) || cpu == cpu_of(this_rq)) &&
+ !sched_class_above(cur_class, &ext_sched_class)) {
if (cpumask_test_cpu(cpu, this_scx->cpus_to_preempt)) {
- if (rq->curr->sched_class == &ext_sched_class)
+ if (cur_class == &ext_sched_class)
rq->curr->scx.slice = 0;
cpumask_clear_cpu(cpu, this_scx->cpus_to_preempt);
}
Patches currently in stable-queue which might be from christian.loehle@arm.com are
queue-6.18/sched_ext-don-t-kick-cpus-running-higher-classes.patch
queue-6.18/sched_ext-fix-scx_kick_wait-to-work-reliably.patch
next prev parent reply other threads:[~2026-02-03 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 9:25 [PATCHv2 0/2] SCX kick fixes from 6.19 Christian Loehle
2026-01-29 9:25 ` [PATCH 1/2] sched_ext: Don't kick CPUs running higher classes Christian Loehle
2026-02-03 16:41 ` gregkh [this message]
2026-01-29 9:25 ` [PATCH 2/2] sched_ext: Fix SCX_KICK_WAIT to work reliably Christian Loehle
2026-02-03 16:41 ` Patch "sched_ext: Fix SCX_KICK_WAIT to work reliably" has been added to the 6.18-stable tree gregkh
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=2026020349-rebound-lyricist-de5e@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arighi@nvidia.com \
--cc=christian.loehle@arm.com \
--cc=sched-ext@lists.linux.dev \
--cc=stable-commits@vger.kernel.org \
--cc=tj@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox