[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231228171315.bmjdo5eztyix5o3r@airbuntu>
Date: Thu, 28 Dec 2023 17:13:15 +0000
From: Qais Yousef <qyousef@...alina.io>
To: Lukasz Luba <lukasz.luba@....com>
Cc: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
rafael@...nel.org, dietmar.eggemann@....com, rui.zhang@...el.com,
amit.kucheria@...durent.com, amit.kachhap@...il.com,
daniel.lezcano@...aro.org, viresh.kumar@...aro.org,
len.brown@...el.com, pavel@....cz, mhiramat@...nel.org,
wvw@...gle.com
Subject: Re: [PATCH v5 03/23] PM: EM: Find first CPU active while updating
OPP efficiency
On 12/19/23 10:53, Lukasz Luba wrote:
>
>
> On 12/17/23 17:58, Qais Yousef wrote:
> > On 11/29/23 11:08, Lukasz Luba wrote:
> > > The Energy Model might be updated at runtime and the energy efficiency
> > > for each OPP may change. Thus, there is a need to update also the
> > > cpufreq framework and make it aligned to the new values. In order to
> > > do that, use a first active CPU from the Performance Domain. This is
> > > needed since the first CPU in the cpumask might be offline when we
> > > run this code path.
> >
> > I didn't understand the problem here. It seems you're fixing a race, but the
> > description is not clear to me what the race is.
>
> I have explained that in v1, v4 comments for this patch.
> When the EM is registered the fist CPU is always online. No problem
> for the old code, but for new code with runtime modification at
> later time, potentially from different subsystems - it it (e.g. thermal,
> drivers, etc). The fist CPU might be offline, but still such EM
> update for this domain shouldn'y fail. Although, when the CPU is offline
> we cannot get the valid policy...
>
> We can get it for next cpu in the cpumask, that's what the code is
> doing.
Okay, I can see now that cpufreq_cpu_get_raw() ignores offline CPUs
intentionally.
A new variant seems better to me. But the experts know better. So LGTM.
Powered by blists - more mailing lists