Re: [PATCH] sched/debug: Introduce per-CPU debugfs files

From: Daniel Vacek

Date: Tue Jul 28 2026 - 09:45:34 EST


On Tue, 28 Jul 2026 at 12:48, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Mon, Jul 27, 2026 at 10:03:09PM -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. This results in redundant output and
> > parsing overhead on large SMP systems when targeting an individual CPU.
> >
> > 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.
>
> You're failing to explain why though. In what situation does the
> overhead from sched/debug matter one whit? If you're dumping this at
> frequencies high enough for this to matter, you're doing something
> terribly wrong.

I can imagine running a realtime app pinned on an isolated CPU (for
example any DPDK app like FlexRAN on top of Kubernetes/OpenShift,
etc.) and debugging system noise/starved victims on this CPU. Why dump
sched details from other CPUs and look for a needle in the haystack?
This actually makes sense to me.

--nX