mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pengjie Zhang <zhangpengjie2@huawei.com>
To: Christian Loehle <christian.loehle@arm.com>, <rafael@kernel.org>,
	<viresh.kumar@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: <linuxarm@huawei.com>, <zhanjie9@hisilicon.com>,
	<prime.zeng@hisilicon.com>, <wanghuiqiang@huawei.com>,
	<xuwei5@huawei.com>, <zhenglifeng1@huawei.com>,
	<yubowen8@huawei.com>, <pierre.gondois@arm.com>,
	<sumitg@nvidia.com>, <linux-pm@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <mojunjun4@huawei.com>
Subject: Re: [PATCH] cpufreq: cppc: Enable boost by default when supported
Date: Fri, 16 Oct 2026 20:55:23 +0800	[thread overview]
Message-ID: <342f2eb0-2028-4661-8679-cbb8d7cb354b@huawei.com> (raw)
In-Reply-To: <0d05f4b5-b7f3-4fb5-b5cb-8b4d75ab78b3@arm.com>

Hi Christian,

Thanks for the review.

On 10/15/2026 4:42 PM, Christian Loehle wrote:
> On 10/15/26 02:58, Pengjie Zhang wrote:
>> The CPPC driver leaves boost disabled by default, even when Highest
> "even"? That's the only case where disabling it even means something?

Agreed, I'll remove "even" in v2.

>> Performance exceeds Nominal Performance. Userspace must explicitly
>> enable boost before governors can use the full advertised performance
>> range.
>>
>> For user convenience, enable boost by default when at least one possible
>> CPU reports support. Check the performance capabilities before registering
>> the driver so that the cpufreq core enables boost for each policy that
>> supports it.
>>
>> Signed-off-by: Pengjie Zhang <zhangpengjie2@huawei.com>
> I often wonder if we should keep boost altogether, the power and
> thermal envelope on silicon nowadays is complex enough for this to have
> little meaning, it in no way guarantees no throttling or that you receive
> the requested performance.
I agree that enabling boost does not guarantee the requested performance.

However, CPPC distinguishes Nominal from Highest Performance. Highest
Performance may not be sustainable for long durations, while Nominal
Performance is expected to be able to maintain continuously.

Boost control lets user trade off burst capacity above nominal against
staying within safe limits. While performance won't be completely steady,
having that flexibility is worth it."

> The (silicon-aware) user can always individually set the ceilings s.t.
> it 'works' for their platform/workload/environment combination via
> scaling_max_freq.
Yes, but users need to determine an appropriate frequency ceiling for
their platform. The boost  provides a simpler way to select the
nominal limit without determining its frequency value for each policy.
>
> Since commit 54e74df5d76d
> was also introduced by Huawei I'd be curious about the usage there,
> AFAICS having a platform with NOMINAL_PERF != HIGHEST_PERF is just
> additional headache on linux for now?
On our server platforms, users can configure whether firmware advertises
highest_perf above nominal_perf. CPPC defines both performance levels and
allows them to differ.

My proposal makes that advertised range available by default while
retaining the boost control for users who want to exclude it.

Thanks,
Pengjie


>> ---
>>   drivers/cpufreq/cppc_cpufreq.c | 20 ++++++++++++++++++++
>>   1 file changed, 20 insertions(+)
>>
>> diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
>> index 80893844353c..0a4255a36f60 100644
>> --- a/drivers/cpufreq/cppc_cpufreq.c
>> +++ b/drivers/cpufreq/cppc_cpufreq.c
>> @@ -1052,6 +1052,25 @@ static struct cpufreq_driver cppc_cpufreq_driver = {
>>   	.name = "cppc_cpufreq",
>>   };
>>   
>> +static void __init cppc_cpufreq_default_boost_init(void)
>> +{
>> +	struct cppc_perf_caps caps;
>> +	bool enable = false;
>> +	int cpu;
>> +
>> +	for_each_possible_cpu(cpu) {
>> +		if (cppc_get_perf_caps(cpu, &caps))
>> +			continue;
>> +
>> +		if (caps.highest_perf > caps.nominal_perf) {
>> +			enable = true;
>> +			break;
>> +		}
>> +	}
>> +
>> +	cppc_cpufreq_driver.boost_enabled = enable;
>> +}
>> +
>>   static int __init cppc_cpufreq_init(void)
>>   {
>>   	int ret;
>> @@ -1061,6 +1080,7 @@ static int __init cppc_cpufreq_init(void)
>>   
>>   	cppc_freq_invariance_init();
>>   	populate_efficiency_class();
>> +	cppc_cpufreq_default_boost_init();
>>   
>>   	ret = cpufreq_register_driver(&cppc_cpufreq_driver);
>>   	if (ret)
>

      reply	other threads:[~2026-10-16 12:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15  1:58 Pengjie Zhang
2026-10-15  8:42 ` Christian Loehle
2026-10-16 12:55   ` Pengjie Zhang [this message]

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=342f2eb0-2028-4661-8679-cbb8d7cb354b@huawei.com \
    --to=zhangpengjie2@huawei.com \
    --cc=christian.loehle@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mojunjun4@huawei.com \
    --cc=pierre.gondois@arm.com \
    --cc=prime.zeng@hisilicon.com \
    --cc=rafael@kernel.org \
    --cc=sumitg@nvidia.com \
    --cc=viresh.kumar@linaro.org \
    --cc=wanghuiqiang@huawei.com \
    --cc=xuwei5@huawei.com \
    --cc=yubowen8@huawei.com \
    --cc=zhanjie9@hisilicon.com \
    --cc=zhenglifeng1@huawei.com \
    /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®