From: Tejun Heo <tj@kernel.org>
To: David Vernet <void@manifault.com>,
Andrea Righi <arighi@nvidia.com>,
Changwoo Min <changwoo@igalia.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Emil Tsalapatis <emil@etsalapatis.com>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org,
Tejun Heo <tj@kernel.org>
Subject: [PATCH 2/3] sched_ext: Drop the stale keep_prev fixup in dispatch_pick()
Date: Fri, 14 Aug 2026 15:05:31 -1000 [thread overview]
Message-ID: <20260815010532.3663253-3-tj@kernel.org> (raw)
In-Reply-To: <20260815010532.3663253-1-tj@kernel.org>
The fixup demoting a keep verdict when @prev is not on ext_sched_class
guarded against the rq-level SCX_RQ_BAL_KEEP flag going stale back when
balancing and picking were separate operations.
The verdict now travels in the return value, created and consumed in one
invocation against the @prev it evaluated, and every keep decision tests
SCX_TASK_QUEUED under the rq lock, which implies ext_sched_class as a class
switch dequeues first. Drop the fixup along with dispatch_core_pick()'s
copy.
Signed-off-by: Tejun Heo <tj@kernel.org>
---
kernel/sched/ext/ext.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
index 4867517b71a4..19db98f0e727 100644
--- a/kernel/sched/ext/ext.c
+++ b/kernel/sched/ext/ext.c
@@ -3355,11 +3355,6 @@ static enum scx_dsp_verdict dispatch_pick(struct rq *rq, struct rq_flags *rf,
kick_sync_wait_bal_cb);
}
- if (unlikely(verdict == SCX_DSP_PREV && prev->sched_class != &ext_sched_class)) {
- WARN_ON_ONCE(scx_enable_state() == SCX_ENABLED);
- verdict = SCX_DSP_LOCAL;
- }
-
return verdict;
}
@@ -3410,13 +3405,6 @@ static enum scx_dsp_verdict dispatch_core_pick(struct rq *rq, struct rq_flags *r
if (rq->scx.lock_drop_seq != seq)
return SCX_DSP_RETRY;
- /* see dispatch_pick() */
- if (unlikely(verdict == SCX_DSP_PREV &&
- prev->sched_class != &ext_sched_class)) {
- WARN_ON_ONCE(scx_enable_state() == SCX_ENABLED);
- verdict = SCX_DSP_LOCAL;
- }
-
return verdict;
}
#else /* CONFIG_SCHED_CORE */
--
2.55.0
next prev parent reply other threads:[~2026-08-15 1:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 1:05 [PATCHSET sched_ext/for-7.3] sched_ext: Dispatch path follow-ups Tejun Heo
2026-08-15 1:05 ` [PATCH 1/3] sched_ext: Keep kick_sync waiting on the rq's own CPU Tejun Heo
2026-08-15 1:05 ` Tejun Heo [this message]
2026-08-15 1:05 ` [PATCH 3/3] sched_ext: Rename balance-era identifiers to dispatch terms Tejun Heo
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=20260815010532.3663253-3-tj@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=emil@etsalapatis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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.