summaryrefslogtreecommitdiff
path: root/include/linux/sched
diff options
context:
space:
mode:
authorCheng-Yang Chou <yphbchou0911@gmail.com>2026-06-10 23:26:56 +0800
committerTejun Heo <tj@kernel.org>2026-06-24 12:48:32 -1000
commit252891d03dfb239fb76a78ab06b0e5a8719e0f86 (patch)
treeee8a0ba015dbdf42f213b4dbd13fb106260c7d55 /include/linux/sched
parentda428d572e07bb9dd2d076297ef5700f6483aafd (diff)
downloadlinux-252891d03dfb239fb76a78ab06b0e5a8719e0f86.tar.gz
linux-252891d03dfb239fb76a78ab06b0e5a8719e0f86.zip
sched_ext, rcu: Upgrade RCU stall paths to report cpumask of stalled CPUs
scx_rcu_cpu_stall() previously recorded the detector CPU rather than the stalled one, and the expedited grace period path had no stalled CPU to report at all. Thread a cpumask through panic_on_rcu_stall() and scx_rcu_cpu_stall() to capture all stalled CPUs. Report cpumask_first() as exit_cpu and the full CPU list in the exit message. Task-only stalls yield exit_cpu = -1. Store the stall mask in scx_sched rather than scx_exit_info, keeping the BPF-visible struct unchanged. scx_dump_state() reads sch->stall_cpus directly and dumps all stalled CPUs first to avoid losing them to truncation. Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com> Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/sched')
-rw-r--r--include/linux/sched/ext.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/sched/ext.h b/include/linux/sched/ext.h
index 20b2343aa344..75cb8b119fb7 100644
--- a/include/linux/sched/ext.h
+++ b/include/linux/sched/ext.h
@@ -263,7 +263,7 @@ void sched_ext_dead(struct task_struct *p);
void print_scx_info(const char *log_lvl, struct task_struct *p);
void scx_softlockup(u32 dur_s);
bool scx_hardlockup(int cpu);
-bool scx_rcu_cpu_stall(void);
+bool scx_rcu_cpu_stall(const struct cpumask *stalled_mask);
#else /* !CONFIG_SCHED_CLASS_EXT */
@@ -271,7 +271,7 @@ static inline void sched_ext_dead(struct task_struct *p) {}
static inline void print_scx_info(const char *log_lvl, struct task_struct *p) {}
static inline void scx_softlockup(u32 dur_s) {}
static inline bool scx_hardlockup(int cpu) { return false; }
-static inline bool scx_rcu_cpu_stall(void) { return false; }
+static inline bool scx_rcu_cpu_stall(const struct cpumask *stalled_mask) { return false; }
#endif /* CONFIG_SCHED_CLASS_EXT */