All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET sched_ext/for-7.3] sched_ext: Sparse annotation cleanups
@ 2026-07-24  1:29 Tejun Heo
  2026-07-24  1:29 ` [PATCH 1/3] sched_ext: Add scx_cgroup_sched() for cgrp->scx_sched reads Tejun Heo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tejun Heo @ 2026-07-24  1:29 UTC (permalink / raw)
  To: David Vernet, Andrea Righi, Changwoo Min
  Cc: sched-ext, Emil Tsalapatis, linux-kernel, Tejun Heo

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-24  1:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24  1:29 [PATCHSET sched_ext/for-7.3] sched_ext: Sparse annotation cleanups Tejun Heo
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

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.