From: Nathan Fontenot <nafonten@amd.com>
To: Perry Yuan <Perry.Yuan@amd.com>,
rafael.j.wysocki@intel.com, viresh.kumar@linaro.org,
Ray.Huang@amd.com
Cc: Deepak.Sharma@amd.com, Mario.Limonciello@amd.com,
Nathan.Fontenot@amd.com, Alexander.Deucher@amd.com,
Jinzhou.Su@amd.com, Xinmei.Huang@amd.com, Xiaojian.Du@amd.com,
Li.Meng@amd.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 07/14] cpufreq: amd_pstate: map desired perf into pstate scope for powersave governor
Date: Mon, 11 Jul 2022 14:33:48 -0500 [thread overview]
Message-ID: <359a0e0a-b118-450e-67d8-a784d1a43cca@amd.com> (raw)
In-Reply-To: <20220709141901.835903-1-Perry.Yuan@amd.com>
On 7/9/22 09:19, Perry Yuan wrote:
> The patch will fix the invalid desired perf value for powersave
> governor. This issue is found when testing on one AMD EPYC system, the
> actual des_perf is smaller than the min_perf value, that is invalid
> value. because the min_perf is the lowest_perf system can support in
> idle state.
>
> Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
> ---
> drivers/cpufreq/amd-pstate.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 7c51f4125263..8a2b6ad9b8c0 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -265,6 +265,7 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
> u64 prev = READ_ONCE(cpudata->cppc_req_cached);
> u64 value = prev;
>
> + des_perf = clamp_t(unsigned long, des_perf, min_perf, max_perf);
You should also update amd_pstate_adjust_perf() to remove the clamp_t() call now
that it is done here.
-Nathan
> value &= ~AMD_CPPC_MIN_PERF(~0L);
> value |= AMD_CPPC_MIN_PERF(min_perf);
>
next prev parent reply other threads:[~2022-07-11 19:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-09 14:19 Perry Yuan
2022-07-11 19:33 ` Nathan Fontenot [this message]
2022-07-12 9:28 ` Yuan, Perry
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=359a0e0a-b118-450e-67d8-a784d1a43cca@amd.com \
--to=nafonten@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Deepak.Sharma@amd.com \
--cc=Jinzhou.Su@amd.com \
--cc=Li.Meng@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Nathan.Fontenot@amd.com \
--cc=Perry.Yuan@amd.com \
--cc=Ray.Huang@amd.com \
--cc=Xiaojian.Du@amd.com \
--cc=Xinmei.Huang@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.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
all inboxes | Powered by JetHome®