Re: [RFC PATCH 3/4] cpufreq: Add Active Stats calls tracking frequency changes

From: Viresh Kumar
Date: Tue Jun 22 2021 - 23:15:48 EST


On 22-06-21, 12:07, Lukasz Luba wrote:
> That cpufreq_stats_record_transition() is present only if
> CONFIG_CPU_FREQ_STAT is set. I didn't wanted to be dependent on
> this config.

Right, but you can also update the dummy
cpufreq_stats_record_transition() function as well and you won't
depend on the CONFIG then.

> >
> > Plus don't you need to record this for all policy->cpus instead of
> > just policy->cpu ?
> >
>
> It will be accounted for all cpus in that freq domain. The
> active_stats_cpu_freq_fast_change() implementation uses
> a shared structure (single for whole domain) 'shared_ast':
> _active_stats_cpu_freq_change(ast->shared_ast, freq, ts)
> (from patch 1/4)

Ahh, I missed that then.

--
viresh