[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z9f9ljbTDGOGZUSb@gmail.com>
Date: Mon, 17 Mar 2025 11:46:46 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org, linux-rt-devel@...ts.linux.dev,
Ben Segall <bsegall@...gle.com>,
Catalin Marinas <catalin.marinas@....com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
Mel Gorman <mgorman@...e.de>, Peter Zijlstra <peterz@...radead.org>,
Shrikanth Hegde <sshegde@...ux.ibm.com>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Valentin Schneider <vschneid@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Will Deacon <will@...nel.org>
Subject: Re: [PATCH v4 1/9] sched: Add a generic function to return the
preemption string.
* Ingo Molnar <mingo@...nel.org> wrote:
>
> * Sebastian Andrzej Siewior <bigeasy@...utronix.de> wrote:
>
> > On 2025-03-17 10:12:31 [+0100], Ingo Molnar wrote:
> > >
> > > * Sebastian Andrzej Siewior <bigeasy@...utronix.de> wrote:
> > >
> > > > On 2025-03-16 12:15:47 [+0100], Ingo Molnar wrote:
> > > > >
> > > > > * Sebastian Andrzej Siewior <bigeasy@...utronix.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
Powered by blists - more mailing lists