mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre Gondois <pierre.gondois@arm.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jie Zhan <zhanjie9@hisilicon.com>,
	Lifeng Zheng <zhenglifeng1@huawei.com>,
	Ionela Voinescu <ionela.voinescu@arm.com>,
	Sumit Gupta <sumitg@nvidia.com>,
	Christian Loehle <christian.loehle@arm.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Huang Rui <ray.huang@amd.com>,
	"Gautham R. Shenoy" <gautham.shenoy@amd.com>,
	Mario Limonciello <mario.limonciello@amd.com>,
	Perry Yuan <perry.yuan@amd.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Len Brown <lenb@kernel.org>,
	Saravana Kannan <saravanak@kernel.org>,
	linux-pm@vger.kernel.org
Subject: Re: [RFC PATCH v5 6/6] cpufreq/freq_table: Allow decreasing cpuinfo.max_freq
Date: Fri, 13 Mar 2026 15:28:25 +0100	[thread overview]
Message-ID: <686195a5-5ac6-42a1-b73b-a94c56775eec@arm.com> (raw)
In-Reply-To: <CAJZ5v0gzVGUWW+qgqSPY2FxJq6F4KLicx=jYriuVrOiekq59XQ@mail.gmail.com>


On 3/11/26 17:24, Rafael J. Wysocki wrote:
> On Wed, Feb 25, 2026 at 9:50 AM Pierre Gondois<pierre.gondois@arm.com> wrote:
>> Drivers not using freq. tables update cpuinfo.max_freq in their
>> .set_boost() callback. E.g. amd-pstate, cppc_cpufreq.
>> Drivers relying on freq. tables and supporting boost frequencies
>> rely on cpufreq_frequency_table_cpuinfo(). cpuinfo.max_freq is
>> only updated if the new maximal value is higher than the previous
>> one.
>>
>> Using the scmi-cpufreq driver which relies on freq. tables, enabling
>> boost will permanently increases the cpuinfo.max_freq value.
>> This patch allows to lower cpuinfo.max_freq.
>>
>> Note:
>> commit 538b0188da46 ("cpufreq: ACPI: Set cpuinfo.max_freq directly
>> if max boost is known")
>> favored having cpuinfo.max_freq reporting the maximal boosted
>> frequency of a CPU instead of the maximal reachable frequency
>> due to regressions in the frequency reported by cpuinfo.max
>> and scaling_cur_freq.
>> As stated above, this is not what most of the other cpufreq driver
>> do. I assume that the following patch:
>> commit 3c55e94c0ade ("cpufreq: ACPI: Extend frequency tables to
>> cover boost frequencies")
>> was correct, but might not have tagged the boosted frequency with
>> the CPUFREQ_BOOST_FREQ flag in the freq. table.
>>
>> Signed-off-by: Pierre Gondois<pierre.gondois@arm.com>
>> ---
>>   drivers/cpufreq/freq_table.c | 7 +------
>>   1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c
>> index 9b37f37c36389..bd08cbe9e9ba3 100644
>> --- a/drivers/cpufreq/freq_table.c
>> +++ b/drivers/cpufreq/freq_table.c
>> @@ -50,12 +50,7 @@ int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy)
>>          }
>>
>>          policy->cpuinfo.min_freq = min_freq;
>> -       /*
>> -        * If the driver has set its own cpuinfo.max_freq above max_freq, leave
>> -        * it as is.
>> -        */
>> -       if (policy->cpuinfo.max_freq < max_freq)
>> -               policy->cpuinfo.max_freq = max_freq;
>> +       policy->cpuinfo.max_freq = max_freq;
>>
>>          if (min_freq == ~0)
>>                  return -EINVAL;
>> --
> How exactly does this change depend on the previous patches?

Without it, the pattern in the cover letter:

# ## Init
scaling_max_freq:1000000
cpuinfo_max_freq:1000000

# echo 700000 > scaling_max_freq
scaling_max_freq:700000
cpuinfo_max_freq:1000000

# echo 1 > ../boost
scaling_max_freq:700000
cpuinfo_max_freq:1200000

# echo 800000 > scaling_max_freq
scaling_max_freq:800000
cpuinfo_max_freq:1200000

# echo 0 > ../boost
scaling_max_freq:800000
cpuinfo_max_freq:1000000

doesn't work when using the scmi-cpufreq driver


  reply	other threads:[~2026-03-13 14:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25  8:49 [PATCH v5 0/6] cpufreq: Introduce boost frequency QoS Pierre Gondois
2026-02-25  8:49 ` [PATCH v5 1/6] cpufreq: Remove per-CPU QoS constraint Pierre Gondois
2026-03-13  8:57   ` Viresh Kumar
2026-03-13 14:28     ` Pierre Gondois
2026-03-16 14:45     ` Pierre Gondois
2026-03-16 19:25       ` Rafael J. Wysocki
2026-03-17  8:42       ` zhenglifeng (A)
2026-02-25  8:49 ` [PATCH v5 2/6] cpufreq: Add boost_freq_req QoS request Pierre Gondois
2026-03-11 13:52   ` Rafael J. Wysocki
2026-03-11 13:57     ` Rafael J. Wysocki
2026-03-13 14:28       ` Pierre Gondois
2026-03-13 15:31         ` Rafael J. Wysocki
2026-03-13 15:33           ` Pierre Gondois
2026-03-13  9:17     ` Viresh Kumar
2026-02-25  8:49 ` [PATCH v5 3/6] cpufreq: Centralize boost freq QoS requests Pierre Gondois
2026-03-11 16:11   ` Rafael J. Wysocki
2026-03-13  9:22   ` Viresh Kumar
2026-03-13 14:28     ` Pierre Gondois
2026-03-17 10:28     ` Pierre Gondois
2026-02-25  8:49 ` [PATCH v5 4/6] cpufreq: Update .set_boost() callbacks to rely on boost_freq_req Pierre Gondois
2026-03-11 16:19   ` Rafael J. Wysocki
2026-03-13  9:38     ` Viresh Kumar
2026-03-13 11:43       ` Rafael J. Wysocki
2026-03-13 14:28         ` Pierre Gondois
2026-02-25  8:49 ` [PATCH v5 5/6] cpufreq: Set policy->min and max as real QoS constraints Pierre Gondois
2026-02-25  8:49 ` [RFC PATCH v5 6/6] cpufreq/freq_table: Allow decreasing cpuinfo.max_freq Pierre Gondois
2026-03-11 16:24   ` Rafael J. Wysocki
2026-03-13 14:28     ` Pierre Gondois [this message]
2026-03-13  8:13 ` [PATCH v5 0/6] cpufreq: Introduce boost frequency QoS Viresh Kumar
2026-03-13 14:27   ` Pierre Gondois

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=686195a5-5ac6-42a1-b73b-a94c56775eec@arm.com \
    --to=pierre.gondois@arm.com \
    --cc=christian.loehle@arm.com \
    --cc=gautham.shenoy@amd.com \
    --cc=ionela.voinescu@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=perry.yuan@amd.com \
    --cc=rafael@kernel.org \
    --cc=ray.huang@amd.com \
    --cc=saravanak@kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=sumitg@nvidia.com \
    --cc=viresh.kumar@linaro.org \
    --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®