[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 5 May 2022 13:14:08 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Vincent Guittot <vincent.guittot@...aro.org>
Cc: Rafael Wysocki <rjw@...ysocki.net>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
linux-pm@...r.kernel.org, Rex-BC Chen <rex-bc.chen@...iatek.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] cpufreq: Avoid unnecessary frequency updates due to
mismatch
On 05-05-22, 09:28, Vincent Guittot wrote:
> On Wed, 4 May 2022 at 10:21, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> >
> > For some platforms, the frequency returned by hardware may be slightly
> > different from what is provided in the frequency table. For example,
>
> Do you have more details ?
This is where the problem was discussed.
https://lore.kernel.org/lkml/20220422075239.16437-8-rex-bc.chen@mediatek.com/
> Do you mean that between 2 consecutives reads you can get either
> 500Mhz or 499Mhz ?
No, the hardware always returns something like 499,999,726 Hz, but the
OPP table contains the value 500 MHz. The field policy->cur is set
based on opp table eventually (target_index) and so contains 500MHz,
almost always. But when cpufreq_get() is called, it finds the current
freq is 499 MHz, instead of 500 MHz. And so the issue.
> Or is it a fixed mismatch between the table and the freq returned by HW ?
Yes.
--
viresh
Powered by blists - more mailing lists