[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230726212611.GA3869583@hirez.programming.kicks-ass.net>
Date: Wed, 26 Jul 2023 23:26:11 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
g@...ez.programming.kicks-ass.net
Cc: Anna-Maria Behnsen <anna-maria@...utronix.de>,
Frederic Weisbecker <frederic@...nel.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
"Gautham R. Shenoy" <gautham.shenoy@....com>,
Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Valentin Schneider <vschneid@...hat.com>
Subject: Re: Stopping the tick on a fully loaded system
On Wed, Jul 26, 2023 at 06:49:58PM +0200, Peter Zijlstra wrote:
> On Wed, Jul 26, 2023 at 06:14:32PM +0200, Peter Zijlstra wrote:
> > On Wed, Jul 26, 2023 at 05:53:46PM +0200, Rafael J. Wysocki wrote:
> >
> > > > > That means we don't track nearly enough data to reliably tell anything
> > > > > about disabling the tick or not. We should have at least one bucket
> > > > > beyond TICK_NSEC for this.
> > > >
> > > > Quite likely.
> > >
> > > So the reasoning here was that those additional bins would not be
> > > necessary for idle state selection, but the problem of whether or not
> > > to stop the tick is kind of separate from the idle state selection
> > > problem if the target residency values for all of the idle states are
> > > relatively short. And so it should be addressed separately which
> > > currently it is not. Admittedly, this is a mistake.
> >
> > Right, the C state buckets are enough to pick a state, but not to handle
> > the tick thing.
> >
> > The below hack boots on my ivb-ep with extra (disabled) states. Now let
> > me go hack up teo to make use of that.
> >
> > name residency
> >
> > POLL 0
> > C1 1
> > C1E 80
> > C3 156
> > C6 300
> > TICK 1000
> > POST-TICK 2000
> >
>
> builds and boots, futher untested -- I need to see to dinner.
>
> The idea is that teo_update() should account to the highest state if
> measured_ns is 'large'.
>
> Then, then the tick is on, see if the majority (50%) of the
> hit+intercepts are below the TICK threshold, if so, don't stop the tick
> and assume duration_ns = TICK_NSEC -- iow. don't call
> tick_nohz_get_sleep_length().
>
> I'll check if the below code actually does as intended once the loonies
> are in bed.
D'oh, it suffers the 'obvious' problem. Since the tick is not disabled,
we'll never log sleeps longer than the tick and hence never decide to
disable the tick.
Clever of me... This needs a wee bit of refining it does :-)
Powered by blists - more mailing lists