From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>
Cc: sashiko-bot@kernel.org, David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
sched-ext@lists.linux.dev, Emil Tsalapatis <emil@etsalapatis.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH sched_ext/for-7.3-fixes 4/4] sched_ext: scx_qmap: Place only on cids whose caps are in effect
Date: Sat, 5 Sep 2026 21:24:22 +0200 [thread overview]
Message-ID: <apxsZjPo7IzPuC1x@gpd4> (raw)
In-Reply-To: <c1b5b24af15ee3e117bfa07f8c89aad2@kernel.org>
On Sat, Sep 05, 2026 at 06:40:32AM -1000, Tejun Heo wrote:
> Hello,
>
> > This is a pre-existing issue, but can lockless readers observe a transiently
> > zeroed qa.self_cids.mask here and incorrectly fall through to the rescue block?
>
> Yes, but scx_qmap is an example scheduler and the result is a spurious rescue
> insert, which isn't critical. The race is acceptable.
BTW, while looking at this I noticed another potential different race in
qmap_sub_ecaps_updated() busy/pending handoff.
CPU0 CPU1
holds part_busy
refresh_usable() using old avail
update avail_cids
part_try_start() fails
sees part_pending == 0
part_end()
returns
sets part_pending = 1
IIUC, there's no owner left to consume part_pending immediately at this point,
so usable_cids can remain stale until the next rr_advance() or redistribute()
pass. It should self-correct, but a task may remain queued until another
dispatch event.
This is likely not a big problem either, just wanted to point it out as a
separate one from the transient self_cids issue reported by Sashiko.
Thanks,
-Andrea
next prev parent reply other threads:[~2026-09-05 19:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-05 16:09 [PATCHSET sched_ext/for-7.3-fixes] sched_ext: Fix keep-last for sub-scheduler tasks and two scx_qmap placement loops Tejun Heo
2026-09-05 16:09 ` [PATCH sched_ext/for-7.3-fixes 1/4] sched_ext: Rename sch to root_sch in dispatch_one() Tejun Heo
2026-09-05 16:09 ` [PATCH sched_ext/for-7.3-fixes 2/4] sched_ext: Use @prev's scheduler for the keep decisions " Tejun Heo
2026-09-05 16:09 ` [PATCH sched_ext/for-7.3-fixes 3/4] sched_ext: scx_qmap: Do not add IMMED to rescue inserts Tejun Heo
2026-09-05 16:09 ` [PATCH sched_ext/for-7.3-fixes 4/4] sched_ext: scx_qmap: Place only on cids whose caps are in effect Tejun Heo
[not found] ` <20260905162223.6EF521F00A3A@smtp.kernel.org>
2026-09-05 16:40 ` Tejun Heo
2026-09-05 19:24 ` Andrea Righi [this message]
2026-09-05 19:25 ` [PATCHSET sched_ext/for-7.3-fixes] sched_ext: Fix keep-last for sub-scheduler tasks and two scx_qmap placement loops Andrea Righi
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=apxsZjPo7IzPuC1x@gpd4 \
--to=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=emil@etsalapatis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sashiko-bot@kernel.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
all inboxes | Powered by JetHome®