All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Valentin Schneider <vschneid@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mel Gorman <mgorman@suse.de>,
	Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [PATCH 0/5] sched: Make CONFIG_SCHED_DEBUG features unconditional
Date: Wed, 19 Mar 2025 22:14:31 +0100	[thread overview]
Message-ID: <Z9szt3MpQmQ56TRd@gmail.com> (raw)
In-Reply-To: <83c3bd7f-3ff9-4d3c-ab3e-981b73b95141@linux.ibm.com>


* Shrikanth Hegde <sshegde@linux.ibm.com> wrote:

> 
> 
> 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

Indeed - fixed.

I left out all the defconfigs from the patches, because there's a lot 
of them (~79 reference CONFIG_SCHED_DEBUG ...) and they get refreshed 
naturally in any case.

> 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

Thank you for the testing! I'll add:

  Tested-by: Shrikanth Hegde <sshegde@linux.ibm.com>

to the series if you don't mind.

And irrespectively of this series we should probably look at that 1-2% 
overhead in unixbench context switching overhead, maybe there's a few 
low hanging fruits in the debug code.

	Ingo

  reply	other threads:[~2025-03-19 21:14 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17 10:42 [PATCH 0/5] sched: Make CONFIG_SCHED_DEBUG features unconditional Ingo Molnar
2025-03-17 10:42 ` [PATCH 1/5] sched/debug: Change SCHED_WARN_ON() to WARN_ON_ONCE() Ingo Molnar
2025-03-20  9:00   ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-03-24 11:59     ` Peter Zijlstra
2025-03-25  9:37       ` Ingo Molnar
2025-03-25 11:18         ` [PATCH] bug: Introduce CONFIG_DEBUG_BUGVERBOSE_EXTRA=y to also log warning conditions Ingo Molnar
2025-03-25 12:36           ` Peter Zijlstra
2025-03-25 17:48             ` Linus Torvalds
2025-03-25 18:46               ` Peter Zijlstra
2025-03-25 22:42               ` [PATCH] bug: Add the condition string to the CONFIG_DEBUG_BUGVERBOSE=y output Ingo Molnar
2025-03-25 23:12                 ` Linus Torvalds
2025-03-26  7:42                   ` Ingo Molnar
2025-03-17 10:42 ` [PATCH 2/5] sched/debug: Make 'const_debug' tunables unconditional __read_mostly Ingo Molnar
2025-03-20  9:00   ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-03-17 10:42 ` [PATCH 3/5] sched/debug: Make CONFIG_SCHED_DEBUG functionality unconditional Ingo Molnar
2025-03-20  9:00   ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-03-17 10:42 ` [PATCH 4/5] sched/debug, Documentation: Remove (most) CONFIG_SCHED_DEBUG references from documentation Ingo Molnar
2025-03-20  9:00   ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-03-17 10:42 ` [PATCH 5/5] sched/debug: Remove CONFIG_SCHED_DEBUG Ingo Molnar
2025-03-20  8:59   ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-03-24 11:57     ` Peter Zijlstra
2025-03-17 21:39 ` [PATCH 0/5] sched: Make CONFIG_SCHED_DEBUG features unconditional Linus Torvalds
2025-03-17 22:24   ` Ingo Molnar
2025-03-17 22:42     ` Ingo Molnar
2025-03-19  8:49 ` Valentin Schneider
2025-03-19 21:09   ` Ingo Molnar
2025-03-19 12:48 ` Shrikanth Hegde
2025-03-19 21:14   ` Ingo Molnar [this message]
2025-03-20  4:41     ` Shrikanth Hegde
2025-03-20  9:00     ` [tip: sched/core] sched/debug: Remove CONFIG_SCHED_DEBUG from self-test config files tip-bot2 for Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z9szt3MpQmQ56TRd@gmail.com \
    --to=mingo@kernel.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sshegde@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.