public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nabil S. Alramli" <dev@nalramli.com>
To: stable@vger.kernel.org
Cc: nalramli@fastly.com, jdamato@fastly.com, khubert@fastly.com,
	Perry.Yuan@amd.com, li.meng@amd.com, ray.huang@amd.com,
	rafael@kernel.org, viresh.kumar@linaro.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Nabil S. Alramli" <dev@nalramli.com>
Subject: [RFC PATCH 6.1.y 0/1] cpufreq: amd-pstate: Enable CPU boost in passive and guided modes
Date: Thu, 24 Oct 2024 21:05:26 -0400	[thread overview]
Message-ID: <20241025010527.491605-1-dev@nalramli.com> (raw)
In-Reply-To: <Zw8Wn5SPqBfRKUhp@LQ3V64L9R2>

Greetings,

This is a RFC for a maintenance patch to an issue in the amd_pstate driver
where CPU frequency cannot be boosted in passive or guided modes. Without
this patch, AMD machines using stable kernels are unable to get their CPU
frequency boosted, which is a significant performance issue.

For example, on a host that has AMD EPYC 7662 64-Core processor without
this patch running at full CPU load:

$ for i in $(cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq); \
  do ni=$(echo "scale=1; $i/1000000" | bc -l); echo "$ni GHz"; done | \
  sort | uniq -c

    128 2.0 GHz

And with this patch:

$ for i in $(cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq); \
  do ni=$(echo "scale=1; $i/1000000" | bc -l); echo "$ni GHz"; done | \
  sort | uniq -c

    128 3.3 GHz

I am not sure what the correct process is for submitting patches which
affect only stable trees but not the current code base, and do not apply to
the current tree. As such, I am submitting this directly to stable@, but
please let me know if I should be submitting this elsewhere.

The issue was introduced in v6.1 via commit bedadcfb011f ("cpufreq:
amd-pstate: Fix initial highest_perf value"), and exists in stable kernels
up until v6.6.51.

In v6.6.51, a large change, commit 1ec40a175a48 ("cpufreq: amd-pstate:
Enable amd-pstate preferred core support"), was introduced which
significantly refactored the code. This commit cannot be ported back on its
own, and would require reviewing and cherry picking at least a few dozen of
commits in cpufreq, amd-pstate, ACPI, CPPC.

This means kernels v6.1 up until v6.6.51 are affected by this significant
performance issue, and cannot be easily remediated.

Thank you for your attention and I look forward to your response in regards
to what the best way to proceed is for getting this important performance
fix merged.

Best Regards,

Nabil S. Alramli (1):
  cpufreq: amd-pstate: Enable CPU boost in passive and guided modes

 drivers/cpufreq/amd-pstate.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

-- 
2.35.1


       reply	other threads:[~2024-10-25  2:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Zw8Wn5SPqBfRKUhp@LQ3V64L9R2>
2024-10-25  1:05 ` Nabil S. Alramli [this message]
2024-10-25  1:05   ` [RFC PATCH 6.1.y 1/1] cpufreq: amd-pstate: Enable CPU boost in passive and guided modes Nabil S. Alramli
2024-10-25  3:23   ` [RFC PATCH 6.1.y 0/1] " Yuan, Perry
2024-10-28 20:07     ` Mario Limonciello
2024-10-28 21:33       ` Nabil S. Alramli
2024-10-29  4:09         ` Mario Limonciello
2024-10-29  5:56           ` Nabil S. Alramli
2024-10-29 21:36 ` [PATCH 6.1.y v2] " Nabil S. Alramli
2024-10-29 21:54   ` Mario Limonciello

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=20241025010527.491605-1-dev@nalramli.com \
    --to=dev@nalramli.com \
    --cc=Perry.Yuan@amd.com \
    --cc=jdamato@fastly.com \
    --cc=khubert@fastly.com \
    --cc=li.meng@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nalramli@fastly.com \
    --cc=rafael@kernel.org \
    --cc=ray.huang@amd.com \
    --cc=stable@vger.kernel.org \
    --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