From: Ionela Voinescu <ionela.voinescu@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "liwei (JK)" <liwei728@huawei.com>,
Beata Michalska <beata.michalska@arm.com>,
Vanshidhar Konda <vanshikonda@os.amperecomputing.com>,
rafael@kernel.org, al.stone@linaro.org,
ashwin.chaugule@linaro.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, liwei391@huawei.com,
liaoyu15@huawei.com
Subject: Re: [PATCH] cpufreq/cppc: changing highest_perf to nominal_perf in cppc_cpufreq_cpu_init()
Date: Tue, 11 Jun 2024 11:29:09 +0100 [thread overview]
Message-ID: <Zmgm9Rf0piqFqnrI@arm.com> (raw)
In-Reply-To: <20240611094526.vcirawlsdefbkuhf@vireshk-i7>
On Tuesday 11 Jun 2024 at 15:15:26 (+0530), Viresh Kumar wrote:
> On 11-06-24, 10:39, Ionela Voinescu wrote:
> > Makes sense! But maybe we should no longer update policy->cur to the
> > current/hardware frequency once a request comes through from a
> > governor, and we have a first actually requested value.
>
> Hmm, not sure I understood that. When the request comes from governor,
> we only update policy->cur to the requested frequency and not the
> actual hardware frequency. And it is very much required. policy->cur
Yes, I mean we should only update policy->cur to a requested frequency
from a governor, after we start it (cpufreq_start_governor()).
But currently policy->cur gets updated to the .get() returned value in
multiple places, via cpufreq_verify_current_freq() (for example from
show_cpuinfo_cur_freq() or cpufreq_get().
.get() is meant to return the current frequency of the hardware and that
can opportunistically be different from the last request made.
(+ we probably should force the first request from a governor to go
through to the driver to make sure the policy->cur obtained before,
via .get(), did not just happen to coincide with the governor request,
therefore making the request no longer go through to the driver: see
__cpufreq_driver_target)
> needs to be up to date all the times, it is an important part of the
> entire working of the cpufreq core..
>
When you say that "policy->cur must be kept up to date at all times",
I suppose you mean that it should be kept up to date with any frequency
change requests not with any changes happening in hardware?
Thanks,
Ionela.
> --
> viresh
next prev parent reply other threads:[~2024-06-11 10:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-28 9:28 [PATCH] cpufreq/cppc: changing highest_perf to nominal_perf in cppc_cpufreq_cpu_init() liwei
2024-04-29 10:49 ` Viresh Kumar
2024-05-01 17:14 ` Vanshidhar Konda
2024-05-03 14:19 ` Pierre Gondois
2024-05-06 2:21 ` liwei (JK)
2024-05-07 10:25 ` Ionela Voinescu
2024-05-10 3:06 ` liwei (JK)
2024-06-05 14:26 ` Ionela Voinescu
2024-06-06 7:20 ` Viresh Kumar
2024-06-11 9:39 ` Ionela Voinescu
2024-06-11 9:45 ` Viresh Kumar
2024-06-11 10:29 ` Ionela Voinescu [this message]
2024-06-13 8:40 ` Viresh Kumar
2024-06-06 7:16 ` Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zmgm9Rf0piqFqnrI@arm.com \
--to=ionela.voinescu@arm.com \
--cc=al.stone@linaro.org \
--cc=ashwin.chaugule@linaro.org \
--cc=beata.michalska@arm.com \
--cc=liaoyu15@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=liwei391@huawei.com \
--cc=liwei728@huawei.com \
--cc=rafael@kernel.org \
--cc=vanshikonda@os.amperecomputing.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).