Re: [PATCH 0/5] sched: Make CONFIG_SCHED_DEBUG features unconditional
From: Shrikanth Hegde
Date: Wed Mar 19 2025 - 08:49:07 EST
On 3/17/25 16:12, Ingo Molnar wrote:
For more than a decade, CONFIG_SCHED_DEBUG=y has been enabled
in all the major Linux distributions:
/boot/config-6.11.0-19-generic:CONFIG_SCHED_DEBUG=y
The reason is that while originally CONFIG_SCHED_DEBUG started
out as a debugging feature, over the years (decades ...) it has
grown various bits of statistics, instrumentation and
control knobs that are useful for sysadmin and general software
development purposes as well.
A tunable like base_slice which is the only tunable available for EEVDF is under the debug.
So an option is to get rid of CONFIG_SCHED_DEBUG and make it available to all.
We had seen performance regression when domains folder was built with cpu hotplug.
Later that was moved iff verbose was enabled. Maybe something like that can be done
if something is hurting performance.
But within the kernel we still pretend that there's a choice,
and sometimes code that is seemingly 'debug only' creates overhead
that should be optimized in reality.
So make it all official and make CONFIG_SCHED_DEBUG unconditional.
This gets rid of a large amount of #ifdefs, so good riddance ...
There are some references in selftest like these, maybe remove them as well?
tools/testing/selftests/sched_ext/config:CONFIG_SCHED_DEBUG=y
tools/testing/selftests/sched/config:CONFIG_SCHED_DEBUG=y
tools/testing/selftests/wireguard/qemu/debug.config:CONFIG_SCHED_DEBUG=y
Also ran unixbench and hackbench on 80 CPU system (1NUMA) with and without CONFIG_SCHED_DEBUG.
hackbench numbers are almost the same.
for unixbench, process creation/Context Switching show 1-2% improvement with CONFIG_SCHED_DEBUG=n