From: Ingo Molnar <mingo@kernel.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev,
Ben Segall <bsegall@google.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>, Mel Gorman <mgorman@suse.de>,
Peter Zijlstra <peterz@infradead.org>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
Valentin Schneider <vschneid@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Will Deacon <will@kernel.org>
Subject: Re: [PATCH v4 1/9] sched: Add a generic function to return the preemption string.
Date: Mon, 17 Mar 2025 11:46:46 +0100 [thread overview]
Message-ID: <Z9f9ljbTDGOGZUSb@gmail.com> (raw)
In-Reply-To: <Z9f2_exjFEpTpuRr@gmail.com>
* Ingo Molnar <mingo@kernel.org> wrote:
>
> * Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
>
> > On 2025-03-17 10:12:31 [+0100], Ingo Molnar wrote:
> > >
> > > * Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> > >
> > > > On 2025-03-16 12:15:47 [+0100], Ingo Molnar wrote:
> > > > >
> > > > > * Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> > > > >
> > > > > > +const char *preempt_modes[] = {
> > > > > > + "none", "voluntary", "full", "lazy", NULL,
> > > > > > +};
> > > > >
> > > > > > + /* Count entries in NULL terminated preempt_modes */
> > > > > > + for (j = 0; preempt_modes[j]; j++)
> > > > > > + ;
> > > > >
> > > > > I'm pretty sure the build-time ARRAY_SIZE() primitive is superior here. ;-)
> > > >
> > > > It would be but it is not an option.
> > > > That array is defined in core.c where it is "always" required while
> > > > debug.c needs it optionally. core.c is its one compile unit while
> > > > debug.c is included by build_utility.c. So I don't see how this can work
> > > > unless we shift things:
> > >
> > > Why not have it all in debug.c?
> >
> > The debug.c include is behind CONFIG_SCHED_DEBUG. This needs to be moved
> > into debug.c itself so that code can be added regardless of
> > CONFIG_SCHED_DEBUG. It is not only sched-debug after that.
>
> Yeah, that's a valid concern.
>
> The thing is, CONFIG_SCHED_DEBUG is mostly meaningless these days - all
> major distributions enable it because of the statistics are useful for
> system administration, tooling and general software development.
>
> So we should enable it permanently and remove the #ifdeffery. I'll send
> out a series to do so soon.
Here's the series:
https://lore.kernel.org/r/20250317104257.3496611-1-mingo@kernel.org
Ingo Molnar (5):
sched/debug: Change SCHED_WARN_ON() to WARN_ON_ONCE()
sched/debug: Make 'const_debug' tunables unconditional __read_mostly
sched/debug: Make CONFIG_SCHED_DEBUG functionality unconditional
sched/debug, Documentation: Remove (most) CONFIG_SCHED_DEBUG references from documentation
sched/debug: Remove CONFIG_SCHED_DEBUG
Forgot to Cc: you - will do so in future versions.
Thanks,
Ingo
next prev parent reply other threads:[~2025-03-17 10:46 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 16:08 [PATCH v4 0/9] preempt: Add a generic function to return the preemption string Sebastian Andrzej Siewior
2025-03-14 16:08 ` [PATCH v4 1/9] sched: " Sebastian Andrzej Siewior
2025-03-16 11:15 ` Ingo Molnar
2025-03-17 8:31 ` Sebastian Andrzej Siewior
2025-03-17 9:12 ` Ingo Molnar
2025-03-17 9:25 ` Sebastian Andrzej Siewior
2025-03-17 10:18 ` Ingo Molnar
2025-03-17 10:33 ` Sebastian Andrzej Siewior
2025-03-17 11:25 ` Ingo Molnar
2025-03-17 10:46 ` Ingo Molnar [this message]
2025-03-17 10:34 ` [tip: sched/core] " tip-bot2 for Sebastian Andrzej Siewior
2025-03-14 16:08 ` [PATCH v4 2/9] lib/dump_stack: Use preempt_model_str() Sebastian Andrzej Siewior
2025-03-17 10:34 ` [tip: sched/core] " tip-bot2 for Sebastian Andrzej Siewior
2025-03-14 16:08 ` [PATCH v4 3/9] arm: Rely on generic printing of preemption model Sebastian Andrzej Siewior
2025-03-17 10:34 ` [tip: sched/core] " tip-bot2 for Sebastian Andrzej Siewior
2025-03-14 16:08 ` [PATCH v4 4/9] arm64: " Sebastian Andrzej Siewior
2025-03-17 10:34 ` [tip: sched/core] " tip-bot2 for Sebastian Andrzej Siewior
2025-03-14 16:08 ` [PATCH v4 5/9] powerpc: " Sebastian Andrzej Siewior
2025-03-17 10:34 ` [tip: sched/core] " tip-bot2 for Sebastian Andrzej Siewior
2025-03-14 16:08 ` [PATCH v4 6/9] s390: " Sebastian Andrzej Siewior
2025-03-17 10:34 ` [tip: sched/core] " tip-bot2 for Sebastian Andrzej Siewior
2025-03-14 16:08 ` [PATCH v4 7/9] x86: " Sebastian Andrzej Siewior
2025-03-17 10:34 ` [tip: sched/core] " tip-bot2 for Sebastian Andrzej Siewior
2025-03-14 16:08 ` [PATCH v4 8/9] xtensa: " Sebastian Andrzej Siewior
2025-03-17 10:34 ` [tip: sched/core] " tip-bot2 for Sebastian Andrzej Siewior
2025-03-14 16:08 ` [PATCH v4 9/9] tracing: Use preempt_model_str() Sebastian Andrzej Siewior
2025-03-17 10:34 ` [tip: sched/core] " tip-bot2 for Sebastian Andrzej Siewior
2025-03-17 9:14 ` [PATCH v4 0/9] preempt: Add a generic function to return the preemption string Ingo Molnar
2025-03-17 9:28 ` Sebastian Andrzej Siewior
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=Z9f9ljbTDGOGZUSb@gmail.com \
--to=mingo@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=bsegall@google.com \
--cc=catalin.marinas@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=will@kernel.org \
/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.