[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200902132428.GD25462@bogus>
Date: Wed, 2 Sep 2020 14:24:28 +0100
From: Sudeep Holla <sudeep.holla@....com>
To: Ionela Voinescu <ionela.voinescu@....com>
Cc: rjw@...ysocki.net, viresh.kumar@...aro.org,
dietmar.eggemann@....com, catalin.marinas@....com, will@...nel.org,
valentin.schneider@....com, linux-pm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 5/5] arch_topology, arm, arm64: define
arch_scale_freq_invariant()
On Tue, Sep 01, 2020 at 09:55:49PM +0100, Ionela Voinescu wrote:
> From: Valentin Schneider <valentin.schneider@....com>
>
> arch_scale_freq_invariant() is used by schedutil to determine whether
> the scheduler's load-tracking signals are frequency invariant. Its
> definition is overridable, though by default it is hardcoded to 'true'
> if arch_scale_freq_capacity() is defined ('false' otherwise).
>
> This behaviour is not overridden on arm, arm64 and other users of the
> generic arch topology driver, which is somewhat precarious:
> arch_scale_freq_capacity() will always be defined, yet not all cpufreq
> drivers are guaranteed to drive the frequency invariance scale factor
> setting. In other words, the load-tracking signals may very well *not*
> be frequency invariant.
>
> Now that cpufreq can be queried on whether the current driver is driving
> the Frequency Invariance (FI) scale setting, the current situation can
> be improved. This combines the query of whether cpufreq supports the
> setting of the frequency scale factor, with whether all online CPUs are
> counter-based FI enabled.
>
> While cpufreq FI enablement applies at system level, for all CPUs,
> counter-based FI support could also be used for only a subset of CPUs to
> set the invariance scale factor. Therefore, if cpufreq-based FI support
> is present, we consider the system to be invariant. If missing, we
> require all online CPUs to be counter-based FI enabled in order for the
> full system to be considered invariant.
>
> If the system ends up not being invariant, a new condition is needed in
> the counter initialization code that disables all scale factor setting
> based on counters.
>
> Precedence of counters over cpufreq use is not important here. The
> invariant status is only given to the system if all CPUs have at least
> one method of setting the frequency scale factor.
>
> Signed-off-by: Valentin Schneider <valentin.schneider@....com>
> Signed-off-by: Ionela Voinescu <ionela.voinescu@....com>
> Acked-by: Catalin Marinas <catalin.marinas@....com>
> Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Will Deacon <will@...nel.org>
> Cc: Sudeep Holla <sudeep.holla@....com>
Reviewed-by: Sudeep Holla <sudeep.holla@....com>
--
Regards,
Sudeep
Powered by blists - more mailing lists