[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191002182754.GD4643@worktop.programming.kicks-ass.net>
Date: Wed, 2 Oct 2019 20:27:55 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Giovanni Gherdovich <ggherdovich@...e.cz>
Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...e.de>,
Len Brown <lenb@...nel.org>,
"Rafael J . Wysocki" <rjw@...ysocki.net>, x86@...nel.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Mel Gorman <mgorman@...hsingularity.net>,
Matt Fleming <matt@...eblueprint.co.uk>,
Viresh Kumar <viresh.kumar@...aro.org>,
Juri Lelli <juri.lelli@...hat.com>,
Paul Turner <pjt@...gle.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Quentin Perret <qperret@...rret.net>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Doug Smythies <dsmythies@...us.net>
Subject: Re: [PATCH v2 1/2] x86,sched: Add support for frequency invariance
On Wed, Oct 02, 2019 at 02:29:25PM +0200, Giovanni Gherdovich wrote:
> +void x86_arch_scale_freq_tick_enable(void)
> +{
> + tick_disable = false;
> +}
> +
> +static void reset_scale_freq(void *arg)
> +{
> + this_cpu_write(arch_cpu_freq, SCHED_CAPACITY_SCALE);
> +}
> +
> +void x86_arch_scale_freq_tick_disable(void)
> +{
> + on_each_cpu(reset_scale_freq, NULL, 1);
> + tick_disable = true;
I'm thikning this ought to be the other way around, otherwise we can get
a tick loosing the 1024 we just wrote in arch_cpu_freq.
> +}
You've lost the prev_{a,m}perf update, so the first tick after enable
will see 'funny' values.
Powered by blists - more mailing lists