From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>
Cc: David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
sched-ext@lists.linux.dev, Emil Tsalapatis <emil@etsalapatis.com>,
Peter Zijlstra <peterz@infradead.org>,
ElXreno <elxreno@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHSET sched_ext/for-7.2-fixes] sched_ext: Fix core scheduling
Date: Wed, 12 Aug 2026 22:25:42 +0200 [thread overview]
Message-ID: <anzWxjE_Tv8MB3mm@gpd4> (raw)
In-Reply-To: <20260807210221.232543-1-tj@kernel.org>
Hi Tejun,
On Fri, Aug 07, 2026 at 11:02:15AM -1000, Tejun Heo wrote:
> Hello,
>
> sched_ext's core scheduling support has been broken since 4c95380701f5
> ("sched/ext: Fold balance_scx() into pick_task_scx()") made dispatch run
> from inside ->pick_task(). Dispatching can release the rq lock, which lets
> core-wide selections on the same core interleave and corrupt each other's
> state - crashing on a cleared rq->core_pick or leaving a dequeued task
> running, which wedges the machine:
>
> https://github.com/sched-ext/scx/issues/3715
>
> The main fix (0006) makes the core-sched pick return RETRY_TASK whenever
> its dispatch released the rq lock, so that a selection only ever commits
> picks made under a continuously held lock. The preceding patches update
> the core-sched pick to handle lock-dropping picks (0001-0002) and fix
> adjacent breakages from the same fold that core scheduling support needs
> (0003-0005).
From a sched_ext perspective everything looks good to me with the updated patch
3/6. For the whole series:
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Thanks,
-Andrea
>
> 0001-sched-core-Handle-pick_task-releasing-the-rq-lock.patch
> 0002-sched-core-Make-core-sched-flips-wait-for-in-flight-.patch
> 0003-sched_ext-Replace-SCX_RQ_BAL_KEEP-with-a-dispatch-ve.patch
> 0004-sched_ext-Fix-this_rq-assumptions-in-dispatch-kfuncs.patch
> 0005-sched_ext-Count-rq-lock-releases-in-rq-scx.lock_drop.patch
> 0006-sched_ext-Fix-rq-core_pick-corruption-under-core-sch.patch
>
> Based on sched_ext/for-7.2-fixes (d4a00d61a5c2). The patchset is also
> available in the following git branch:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git coresched-fixes
>
> diffstat follows.
>
> kernel/sched/core.c | 49 ++++++--
> kernel/sched/ext/ext.c | 302 +++++++++++++++++++++++++++++++++++--------------
> kernel/sched/sched.h | 5 +-
> 3 files changed, 265 insertions(+), 91 deletions(-)
>
> --
> tejun
prev parent reply other threads:[~2026-08-12 20:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 21:02 [PATCHSET sched_ext/for-7.2-fixes] sched_ext: Fix core scheduling Tejun Heo
2026-08-07 21:02 ` [PATCH 1/6] sched/core: Handle pick_task() releasing the rq lock Tejun Heo
2026-08-07 21:26 ` sashiko-bot
2026-08-10 11:00 ` Peter Zijlstra
2026-08-07 21:02 ` [PATCH 2/6] sched/core: Make core-sched flips wait for in-flight selections Tejun Heo
2026-08-10 11:15 ` Peter Zijlstra
2026-08-10 22:10 ` Tejun Heo
2026-08-11 16:05 ` Peter Zijlstra
2026-08-07 21:02 ` [PATCH 3/6] sched_ext: Replace SCX_RQ_BAL_KEEP with a dispatch verdict return Tejun Heo
2026-08-11 7:43 ` Andrea Righi
2026-08-12 17:06 ` [PATCH v2 " Tejun Heo
2026-08-07 21:02 ` [PATCH 4/6] sched_ext: Fix this_rq() assumptions in dispatch kfuncs Tejun Heo
2026-08-07 21:02 ` [PATCH 5/6] sched_ext: Count rq lock releases in rq->scx.lock_drop_seq Tejun Heo
2026-08-07 21:02 ` [PATCH 6/6] sched_ext: Fix rq->core_pick corruption under core scheduling Tejun Heo
2026-08-07 21:22 ` sashiko-bot
2026-08-12 17:07 ` [PATCHSET sched_ext/for-7.2-fixes] sched_ext: Fix " Tejun Heo
2026-08-12 20:25 ` Andrea Righi [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=anzWxjE_Tv8MB3mm@gpd4 \
--to=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=elxreno@gmail.com \
--cc=emil@etsalapatis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=sched-ext@lists.linux.dev \
--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