[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1568730466.3329.4.camel@suse.cz>
Date: Tue, 17 Sep 2019 16:27:46 +0200
From: Giovanni Gherdovich <ggherdovich@...e.cz>
To: Quentin Perret <qperret@...rret.net>
Cc: srinivas.pandruvada@...ux.intel.com, tglx@...utronix.de,
mingo@...hat.com, peterz@...radead.org, bp@...e.de,
lenb@...nel.org, rjw@...ysocki.net, x86@...nel.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
mgorman@...hsingularity.net, matt@...eblueprint.co.uk,
viresh.kumar@...aro.org, juri.lelli@...hat.com, pjt@...gle.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com
Subject: Re: [PATCH 1/2] x86,sched: Add support for frequency invariance
Hello Quentin,
On Sat, 2019-09-14 at 12:57 +0200, Quentin Perret wrote:
> Hi Giovanni
>
> On Monday 09 Sep 2019 at 04:42:15 (+0200), Giovanni Gherdovich wrote:
> > +static inline long arch_scale_freq_capacity(int cpu)
> > +{
> > + if (static_cpu_has(X86_FEATURE_APERFMPERF))
> > + return per_cpu(arch_cpu_freq, cpu);
>
> So, if this is conditional, perhaps you could also add this check in an
> x86-specific implementation of arch_scale_freq_invariant() ? That would
> guide sugov in the right path (see get_next_freq()) if APERF/MPERF are
> unavailable.
>
> > + return 1024 /* SCHED_CAPACITY_SCALE */;
> > +}
>
Good remark. If the cpu doesn't have APERF/MPERF, the choice here is that
freq_curr is constantly equal to freq_max, and the scaling factor is 1 all the
time.
But I'm checking this static_cpu_has() every time I do a frequency update;
arguably schedutil should be smarter and settle such a case once and for all
at boot time.
I'll check what's the cost of static_cpu_has() and if it's non-negligible I'll
do what you suggest (x86-specific version of arch_scale_freq_invariant().
Giovanni
Powered by blists - more mailing lists