[PATCH v5 0/3] cpufreq: CPPC: Update FIE arch_freq_scale in ticks for non-PCC regs
Viresh Kumar
viresh.kumar at linaro.org
Wed Jan 7 19:10:55 PST 2026
On 23-12-25, 15:21, 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.
>
> Furthermore, with the CPPC FIE registered, it throws repeated warnings of
> "cppc_scale_freq_workfn: failed to read perf counters" on our platform with
> the CPC regs in System Memory and a power-down idle state enabled. That's
> because the remote CPU can be in a power-down idle state, and reading its
> perf counters returns 0. Moving the FIE handling back to the scheduler
> tick process makes the CPU handle its own perf counters, so it won't be
> idle and the issue would be inherently solved.
>
> To address the above issues, update arch_freq_scale directly in ticks for
> non-PCC regs and keep the deferred update mechanism for PCC regs.
>
> We have tested this on Kunpeng SoCs with the CPC regs both in System Memory
> and FFH. More tests on other platforms are welcome (typically with the
> regs in PCC).
>
> Changelog:
> v5:
> - Minor cleanup of cppc_perf_ctrs_in_pcc_cpu() (Thanks to Rafael).
> - Add a function description for cppc_perf_ctrs_in_pcc_cpu().
> - Pick up tags from Lifeng and Pierre, Thanks!
Applied. Thanks.
--
viresh
More information about the linux-arm-kernel
mailing list