From: Punit Agrawal <punit.agrawal@bytedance.com>
To: "Yuan, Perry" <Perry.Yuan@amd.com>
Cc: Punit Agrawal <punit.agrawal@bytedance.com>,
"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
"Huang, Ray" <Ray.Huang@amd.com>,
"viresh.kumar@linaro.org" <viresh.kumar@linaro.org>,
"Sharma, Deepak" <Deepak.Sharma@amd.com>,
"Limonciello, Mario" <Mario.Limonciello@amd.com>,
"Fontenot, Nathan" <Nathan.Fontenot@amd.com>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>,
"Su, Jinzhou (Joe)" <Jinzhou.Su@amd.com>,
"Huang, Shimmer" <Shimmer.Huang@amd.com>,
"Du, Xiaojian" <Xiaojian.Du@amd.com>,
"Meng, Li (Jassmine)" <Li.Meng@amd.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 4/7] cpufreq: amd_pstate: fix wrong lowest perf fetch
Date: Thu, 01 Sep 2022 15:58:50 +0100 [thread overview]
Message-ID: <87pmgfcf9x.fsf@stealth> (raw)
In-Reply-To: <DM4PR12MB52786384C0BFEFF5E0A381079C789@DM4PR12MB5278.namprd12.prod.outlook.com> (Perry Yuan's message of "Wed, 31 Aug 2022 08:53:29 +0000")
"Yuan, Perry" <Perry.Yuan@amd.com> writes:
[...]
>> Perry Yuan <Perry.Yuan@amd.com> writes:
>>
>> > Fix the wrong lowest perf value reading which is used for new des_perf
>> > calculation by governor requested, the incorrect min_perf will get
>> > incorrect des_perf to be set , that will cause the system frequency
>> > changing unexpectedly.
>> >
>> > Reviewed-by: Huang Rui <ray.huang@amd.com>
>> > Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>> > Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
>> > Signed-off-by: Su Jinzhou <jinzhou.su@amd.com>
>> > ---
>> > drivers/cpufreq/amd-pstate.c | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/cpufreq/amd-pstate.c
>> > b/drivers/cpufreq/amd-pstate.c index 5cdef6638681..183cdd4ba00e 100644
>> > --- a/drivers/cpufreq/amd-pstate.c
>> > +++ b/drivers/cpufreq/amd-pstate.c
>> > @@ -307,7 +307,7 @@ static int amd_pstate_target(struct cpufreq_policy
>> *policy,
>> > return -ENODEV;
>> >
>> > cap_perf = READ_ONCE(cpudata->highest_perf);
>> > - min_perf = READ_ONCE(cpudata->lowest_nonlinear_perf);
>> > + min_perf = READ_ONCE(cpudata->lowest_perf);
>> > max_perf = cap_perf;
>> >
>> > freqs.old = policy->cur;
>>
>> This looks to be a pretty big change (lowest nonlinear vs lowest). Does the patch
>> need to be backported to older kernels?
>
> The patch fixes the min perf initial value, the correct min perf is lowest_perf which is captured through MSR_AMD_CPPC_CAP1 register or the cppc_get_perf_caps().
> Yes, the patch will need to be backported to other kernel branch as issue fix.
Great, thanks for confirming!
[...]
next prev parent reply other threads:[~2022-09-01 14:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-14 16:35 [PATCH v5 0/7] AMD Pstate Enhancement And Issue Fixs Perry Yuan
2022-08-14 16:35 ` [PATCH v5 1/7] cpufreq: amd-pstate: cleanup the unused and duplicated headers declaration Perry Yuan
2022-08-15 15:04 ` Punit Agrawal
2022-09-01 5:34 ` Yuan, Perry
2022-08-14 16:35 ` [PATCH v5 2/7] cpufreq: amd-pstate: simplify cpudata pointer assignment Perry Yuan
2022-08-14 16:35 ` [PATCH v5 3/7] cpufreq: amd-pstate: fix white-space Perry Yuan
2022-08-31 19:07 ` Rafael J. Wysocki
2022-08-14 16:35 ` [PATCH v5 4/7] cpufreq: amd_pstate: fix wrong lowest perf fetch Perry Yuan
2022-08-15 15:05 ` Punit Agrawal
2022-08-31 8:53 ` Yuan, Perry
2022-09-01 14:58 ` Punit Agrawal [this message]
2022-08-14 16:35 ` [PATCH v5 5/7] cpufreq: amd_pstate: map desired perf into pstate scope for powersave governor Perry Yuan
2022-08-14 16:35 ` [PATCH v5 6/7] cpufreq: amd-pstate: update pstate frequency transition delay time Perry Yuan
2022-08-15 15:05 ` Punit Agrawal
2022-08-16 7:02 ` Yuan, Perry
2022-08-16 16:03 ` Punit Agrawal
2022-08-14 16:35 ` [PATCH v5 7/7] cpufreq: amd-pstate: add ACPI disabled check in acpi_cpc_valid() Perry Yuan
2022-08-25 11:56 ` Rafael J. Wysocki
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=87pmgfcf9x.fsf@stealth \
--to=punit.agrawal@bytedance.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=Shimmer.Huang@amd.com \
--cc=Xiaojian.Du@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.