aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2025-05-14 12:37:18 -0400
committerTejun Heo <tj@kernel.org>2025-05-14 12:37:18 -0400
commitcb4ff91492de79e1dd1daacf75c2bd7c54d23252 (patch)
treeb87527388d4ad459ea7d7da76ebc7516802a1c64 /kernel
parentsched_ext: Add @sch to SCX_CALL_OP*() (diff)
downloadwireguard-linux-cb4ff91492de79e1dd1daacf75c2bd7c54d23252.tar.xz
wireguard-linux-cb4ff91492de79e1dd1daacf75c2bd7c54d23252.zip
sched_ext: Explain the temporary situation around scx_root dereferences
Naked scx_root dereferences are being used as temporary markers to indicate that they need to be updated to point to the right scheduler instance. Explain the situation. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/ext.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 38c37c842b3e..52e0f9553e73 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -1016,6 +1016,14 @@ enum scx_ops_state {
#define SCX_OPSS_STATE_MASK ((1LU << SCX_OPSS_QSEQ_SHIFT) - 1)
#define SCX_OPSS_QSEQ_MASK (~SCX_OPSS_STATE_MASK)
+/*
+ * NOTE: sched_ext is in the process of growing multiple scheduler support and
+ * scx_root usage is in a transitional state. Naked dereferences are safe if the
+ * caller is one of the tasks attached to SCX and explicit RCU dereference is
+ * necessary otherwise. Naked scx_root dereferences trigger sparse warnings but
+ * are used as temporary markers to indicate that the dereferences need to be
+ * updated to point to the associated scheduler instances rather than scx_root.
+ */
static struct scx_sched __rcu *scx_root;
/*