lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xhsmh4izppfqw.mognet@vschneid-thinkpadt14sgen2i.remote.csb>
Date: Wed, 19 Mar 2025 09:49:11 +0100
From: Valentin Schneider <vschneid@...hat.com>
To: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org
Cc: Dietmar Eggemann <dietmar.eggemann@....com>, Linus Torvalds
 <torvalds@...ux-foundation.org>, Peter Zijlstra <peterz@...radead.org>,
 Shrikanth Hegde <sshegde@...ux.ibm.com>, Thomas Gleixner
 <tglx@...utronix.de>, Steven Rostedt <rostedt@...dmis.org>, Mel Gorman
 <mgorman@...e.de>, Vincent Guittot <vincent.guittot@...aro.org>
Subject: Re: [PATCH 0/5] sched: Make CONFIG_SCHED_DEBUG features unconditional

On 17/03/25 11:42, 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.
>
> 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 ...
>

Pretty much every distro I'm aware of has CONFIG_SCHED_DEBUG=y; a quick check
tells me it's been like so for RHEL since at least 2013, and that's from a
commit copying configs from RHEL-6 to RHEL-7.

Two things however come to mind:

1) What does this mean for the debug stuff we've repeatedly said wasn't ABI
   because it was under CONFIG_SCHED_DEBUG? I've been burned by making
   sched_domain.flags read-only, and there's still writable stuff:

   # ls -al /sys/kernel/debug/sched/domains/cpu0/domain0/
   total 0
   drwxr-xr-x. 2 root root 0 Mar 19 04:36 .
   drwxr-xr-x. 3 root root 0 Mar 19 04:36 ..
   -rw-r--r--. 1 root root 0 Mar 19 04:36 busy_factor
   -rw-r--r--. 1 root root 0 Mar 19 04:36 cache_nice_tries
   -r--r--r--. 1 root root 0 Mar 19 04:36 flags
   -r--r--r--. 1 root root 0 Mar 19 04:36 groups_flags
   -rw-r--r--. 1 root root 0 Mar 19 04:36 imbalance_pct
   -r--r--r--. 1 root root 0 Mar 19 04:36 level
   -rw-r--r--. 1 root root 0 Mar 19 04:36 max_interval
   -rw-r--r--. 1 root root 0 Mar 19 04:36 max_newidle_lb_cost
   -rw-r--r--. 1 root root 0 Mar 19 04:36 min_interval
   -r--r--r--. 1 root root 0 Mar 19 04:36 name

   + all the non topology related debug knobs.

2) Peter mentioned a few times that, last time it was benchmarked, there
   were noticeable perf differences between CONFIG_SCHED_DEBUG=n and
   CONFIG_SCHED_DEBUG=y. This would be an occasion to re-measure that and
   potentially move (some of) these checks to e.g. a sched_debug_verbose
   static key.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ