[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200904094303.GA10031@arm.com>
Date: Fri, 4 Sep 2020 10:43:03 +0100
From: Ionela Voinescu <ionela.voinescu@....com>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: rjw@...ysocki.net, sudeep.holla@....com, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpufreq,cppc: fix issue when hotplugging out policy->cpu
Hi Viresh,
On Friday 04 Sep 2020 at 10:36:04 (+0530), Viresh Kumar wrote:
[..]
> > /* Per CPU container for runtime CPPC management. */
> > struct cppc_cpudata {
> > - int cpu;
> > struct cppc_perf_caps perf_caps;
> > struct cppc_perf_ctrls perf_ctrls;
> > struct cppc_perf_fb_ctrs perf_fb_ctrs;
>
> With the way things are designed, I believe this is one of the bugs
> out of many.
>
> The structure cppc_cpudata must be shared across all CPUs of the same
> policy, so they all end up using the same set of values for different
> variables. i.e. it shouldn't be a per-cpu thing at all. Just allocate
> it from cpufreq_driver->init and store in policy->driver_data for use
> elsewhere.
>
> That would be a proper fix IMO, we just avoided one of the bugs here
> otherwise.
>
Do you know why it was designed this way in the first place?
I assumed it was designed like this (per-cpu cppc_cpudata structures) to
allow for the future addition of support for the HW_ALL CPPC coordination
type. In that case you can still have PSD (dependency) domains but the
desired performance controls would be per-cpu, with the coordination
done in hardware/firmware. So, in the HW_ALL case you'd end up having
different performance controls even for CPUs in the same policy.
Currently the CPPC driver only supports SW_ANY which is the traditional
cpufreq approach.
Thanks,
Ionela.
> --
> viresh
Powered by blists - more mailing lists