Re: [PATCH v2] sched/debug: Introduce per-CPU debugfs files
From: Aaron Tomlin
Date: Wed Jul 29 2026 - 10:48:17 EST
On Tue, Jul 28, 2026 at 04:52:38PM -0400, Aaron Tomlin wrote:
> Currently, accessing scheduler debugging details for a specific CPU
> requires reading /sys/kernel/debug/sched/debug, which outputs
> information for all online CPUs. When investigating a latency anomaly or
> scheduling issue isolated to a specific CPU, accessing
> /sys/kernel/debug/sched/cpu/cpu<N>/debug provides an immediate, targeted
> view of that runqueue.
>
> Add support for per-CPU debug files under:
> /sys/kernel/debug/sched/cpu/cpu<N>/debug. Reading
> /sys/kernel/debug/sched/cpu/cpu<N>/debug calls print_cpu() specifically
> for CPU <N>, exposing CPU-specific runqueue details on demand. If the
> target CPU is currently offline, reading its file returns -ENODEV.
>
> Signed-off-by: Aaron Tomlin <atomlin@xxxxxxxxxxx>
> ---
> Changes since v1:
>
> - Reframed commit message motivation around targeted interactive
> debugging on large SMP topologies (Peter Zijlstra and Zhan Xusheng)
>
> - Gated sched_debug_cpu_show() with a cpu_online(cpu) check
> returning -ENODEV when target CPU is offline (Zhan Xusheng)
>
> - Linked to v1: https://lore.kernel.org/lkml/20260728020309.6169-1-atomlin@xxxxxxxxxxx/
> ---
> kernel/sched/debug.c | 43 +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 43 insertions(+)
Hi Peter, Ingo, Juri, Vincent,
Sashiko found [1] pre-existing issues, which are not related to this patch.
Would you prefer that I investigate these concerns in this series?
Thank you.
[1]: https://sashiko.dev/#/patchset/20260728205238.18447-1-atomlin%40atomlin.com
Kind regards,
--
Aaron Tomlin