mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jie Zhan <zhanjie9@hisilicon.com>
To: Pierre Gondois <pierre.gondois@arm.com>, <linux-kernel@vger.kernel.org>
Cc: Lifeng Zheng <zhenglifeng1@huawei.com>,
	Ionela Voinescu <ionela.voinescu@arm.com>,
	Sumit Gupta <sumitg@nvidia.com>,
	Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Huang Rui <ray.huang@amd.com>,
	Mario Limonciello <mario.limonciello@amd.com>,
	Perry Yuan <perry.yuan@amd.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Len Brown <lenb@kernel.org>,
	Saravana Kannan <saravanak@kernel.org>,
	<linux-pm@vger.kernel.org>, <linux-doc@vger.kernel.org>
Subject: Re: [PATCH v2 3/4] cpufreq: Remove driver default policy->min/max init
Date: Wed, 20 May 2026 16:15:22 +0800	[thread overview]
Message-ID: <dd5297cc-cf4a-4d36-b2ae-b12abb30a951@hisilicon.com> (raw)
In-Reply-To: <20260511135538.522653-4-pierre.gondois@arm.com>



On 5/11/2026 9:55 PM, Pierre Gondois wrote:
> Prior to [1], drivers were setting policy->min/max and
> the value was used as a QoS constraint. After that change,
> the values were only temporarily used: cpufreq_set_policy()
> ultimately overriding them through:
> cpufreq_policy_online()
> \-cpufreq_init_policy()
>   \-cpufreq_set_policy()
>     \-/* Set policy->min/max */
> 
> This patch reinstate the initial behaviour. This will allow
> drivers to request min/max QoS frequencies if desired.
> For instance, the cppc driver advertises a lowest non-linear
> frequency, which should be used as a min QoS value.
> 
> To avoid having drivers setting policy->min/max to default
> values which are considered as QoS values (i.e. the reason
> why [1] was introduced), remove the initialization of
> policy->min/max in .init() callbacks wherever the
> policy->min/max values are identical to the
> policy->cpuinfo.min/max_freq.
> 
> Indeed, the previous patch ("cpufreq: Set default
> policy->min/max values for all drivers") makes this initialization
> redundant.
> 
> The only drivers where these values are different are:
> - gx-suspmod.c (min)
> - cppc-cpufreq.c (min)
> - longrun.c
> 
> [1]
> commit 521223d8b3ec ("cpufreq: Fix initialization of min and
> max frequency QoS requests")
> 
Acked-by: Jie Zhan <zhanjie9@hisilicon.com>
for the CPPC part, though the rest looks fine but in case I miss something.
> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
> ---
>  drivers/cpufreq/amd-pstate.c      | 14 ++++++--------
>  drivers/cpufreq/cppc_cpufreq.c    |  5 ++---
>  drivers/cpufreq/cpufreq-nforce2.c |  4 ++--
>  drivers/cpufreq/freq_table.c      |  7 +++----
>  drivers/cpufreq/gx-suspmod.c      |  2 +-
>  drivers/cpufreq/intel_pstate.c    |  3 ---
>  drivers/cpufreq/pcc-cpufreq.c     | 10 ++++------
>  drivers/cpufreq/pxa3xx-cpufreq.c  |  5 ++---
>  drivers/cpufreq/sh-cpufreq.c      |  6 ++----
>  drivers/cpufreq/virtual-cpufreq.c |  5 +----
>  10 files changed, 23 insertions(+), 38 deletions(-)
> 
[ ... ]

  reply	other threads:[~2026-05-20  8:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 13:55 [PATCH v2 0/4] cpufreq: Set policy->min and max as real QoS constraints Pierre Gondois
2026-05-11 13:55 ` [PATCH v2 1/4] cpufreq: Extract cpufreq_policy_init_qos() function Pierre Gondois
2026-05-19 13:51   ` Zhongqiu Han
2026-05-28  8:55     ` Pierre Gondois
2026-05-20  8:10   ` Jie Zhan
2026-05-11 13:55 ` [PATCH v2 2/4] cpufreq: Set default policy->min/max values for all drivers Pierre Gondois
2026-05-20  8:12   ` Jie Zhan
2026-05-22  5:43   ` Viresh Kumar
2026-05-28  8:55     ` Pierre Gondois
2026-05-11 13:55 ` [PATCH v2 3/4] cpufreq: Remove driver default policy->min/max init Pierre Gondois
2026-05-20  8:15   ` Jie Zhan [this message]
2026-05-11 13:55 ` [PATCH v2 4/4] cpufreq: Use policy->min/max init as QoS request Pierre Gondois
2026-05-20  8:38   ` Jie Zhan
2026-05-21 11:58     ` Pierre Gondois
2026-05-25  1:05       ` Jie Zhan
2026-05-20 10:03   ` Viresh Kumar
2026-05-21 11:58     ` Pierre Gondois
2026-05-22  5:44       ` Viresh Kumar
2026-05-21 11:26   ` zhenglifeng (A)
2026-05-21 11:58     ` Pierre Gondois
2026-05-22  5:45 ` [PATCH v2 0/4] cpufreq: Set policy->min and max as real QoS constraints Viresh Kumar

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=dd5297cc-cf4a-4d36-b2ae-b12abb30a951@hisilicon.com \
    --to=zhanjie9@hisilicon.com \
    --cc=corbet@lwn.net \
    --cc=ionela.voinescu@arm.com \
    --cc=kprateek.nayak@amd.com \
    --cc=lenb@kernel.org \
    --cc=linux-doc@vger.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=pierre.gondois@arm.com \
    --cc=rafael@kernel.org \
    --cc=ray.huang@amd.com \
    --cc=saravanak@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=sumitg@nvidia.com \
    --cc=viresh.kumar@linaro.org \
    --cc=zhenglifeng1@huawei.com \
    --cc=zhongqiu.han@oss.qualcomm.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®