[PATCH v2 2/2] cpufreq: CPPC: Update FIE arch_freq_scale in ticks for non-PCC regs

Viresh Kumar viresh.kumar at linaro.org
Mon Oct 27 22:13:45 PDT 2025


On 28-08-25, 19:02, Jie Zhan wrote:
> Currently, the CPPC Frequency Invariance Engine (FIE) is invoked from the
> scheduler tick but defers the update of arch_freq_scale to a separate
> thread because cppc_get_perf_ctrs() would sleep if the CPC regs are in PCC.
> 
> However, this deferred update mechanism is unnecessary and introduces extra
> overhead for non-PCC register spaces (e.g. System Memory or FFH), where
> accessing the regs won't sleep and can be safely performed from the tick
> context.  Also, reading perf counters of a remote CPU may return 0 if it's
> in a low-power idle state, e.g. power down or reset.
> 
> Update arch_freq_scale directly in ticks for non-PCC regs and keep the
> deferred update mechanism for PCC regs.
> 
> Signed-off-by: Jie Zhan <zhanjie9 at hisilicon.com>
> ---
>  drivers/cpufreq/cppc_cpufreq.c | 52 +++++++++++++++++++++++-----------
>  1 file changed, 36 insertions(+), 16 deletions(-)

Ionela, Beata, and others.

Can someone please review this one ? This has waiting for a long time already.

-- 
viresh



More information about the linux-arm-kernel mailing list