From: Tejun Heo <tj@kernel.org>
To: David Vernet <void@manifault.com>,
Andrea Righi <arighi@nvidia.com>,
Changwoo Min <changwoo@igalia.com>
Cc: sched-ext@lists.linux.dev, Emil Tsalapatis <emil@etsalapatis.com>,
linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: [PATCHSET sched_ext/for-7.3] sched_ext: Sparse annotation cleanups
Date: Thu, 23 Jul 2026 15:29:11 -1000 [thread overview]
Message-ID: <20260724012914.107823-1-tj@kernel.org> (raw)
Hello,
A sparse sweep of kernel/sched/ext flagged the __rcu pointers that are
read with plain loads. The reads are all protected by their calling
contexts but didn't state how. Add accessors that encode the protection
and convert the readers:
- cgrp->scx_sched readers go through the new scx_cgroup_sched() which
states the locks that stabilize the association (0001).
- The naked scx_root accesses are resolved through the sched at hand or
through new accessors that state the protection. One transitional
marker remains (0002).
- The dsq->first_task identity comparison uses rcu_access_pointer()
(0003).
What remains in the sparse output on kernel/sched/ext is the BPF kfunc
declaration noise shared with the rest of the tree, the rq->curr and
rq->donor accesses shared with the core scheduler, and the deliberately
naked scx_root access in touch_core_sched_dispatch() to be resolved
separately.
Based on sched_ext/for-7.3 (94ca9591108a).
Tejun Heo (3):
sched_ext: Add scx_cgroup_sched() for cgrp->scx_sched reads
sched_ext: Resolve most remaining scx_root accesses
sched_ext: Use rcu_access_pointer() for the first_task comparison
Git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git scx-sparse-cleanups
kernel/sched/ext/ext.c | 20 ++++++++++----------
kernel/sched/ext/idle.c | 15 +++++++--------
kernel/sched/ext/internal.h | 27 +++++++++++++++++++++++++++
kernel/sched/ext/sub.c | 33 +++++++++++++++++++--------------
kernel/sched/ext/sub.h | 14 ++++++++++++++
5 files changed, 77 insertions(+), 32 deletions(-)
--
tejun
next reply other threads:[~2026-07-24 1:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 1:29 Tejun Heo [this message]
2026-07-24 1:29 ` [PATCH 1/3] sched_ext: Add scx_cgroup_sched() for cgrp->scx_sched reads Tejun Heo
2026-07-24 1:29 ` [PATCH 2/3] sched_ext: Resolve most remaining scx_root accesses Tejun Heo
2026-07-24 1:29 ` [PATCH 3/3] sched_ext: Use rcu_access_pointer() for the first_task comparison 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=20260724012914.107823-1-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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox