[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0c06c697-69e1-48c7-99c5-e54581e7818a@huawei.com>
Date: Thu, 15 Jan 2026 11:41:49 +0800
From: "zhenglifeng (A)" <zhenglifeng1@...wei.com>
To: Pierre Gondois <pierre.gondois@....com>
CC: "Rafael J. Wysocki" <rafael@...nel.org>, Viresh Kumar
<viresh.kumar@...aro.org>, <linux-kernel@...r.kernel.org>, Christian Loehle
<christian.loehle@....com>, Ionela Voinescu <ionela.voinescu@....com>, Jie
Zhan <zhanjie9@...ilicon.com>, Huang Rui <ray.huang@....com>, "Gautham R.
Shenoy" <gautham.shenoy@....com>, Mario Limonciello
<mario.limonciello@....com>, Perry Yuan <perry.yuan@....com>,
<linux-pm@...r.kernel.org>
Subject: Re: [PATCH v2 3/3] cpufreq: Update set_boost callbacks to rely on
boost_freq_req
Hi Pierre,
On 2026/1/13 20:20, Rafael J. Wysocki wrote:
> On Tue, Jan 13, 2026 at 2:30 AM Viresh Kumar <viresh.kumar@...aro.org> wrote:
>>
>> On 12-01-26, 16:02, Pierre Gondois wrote:
>>> In:
>>> cpufreq_set_policy()
>>> \-cpufreq_driver->verify(&new_data)
>>> \-cpufreq_verify_within_cpu_limits()
>>>
>>> the requested min/max values are clamped wrt the cpuinfo.[min|max]_freq.
>>> However this clamping happens after the QoS constraints have been
>>> aggregated. This means that if a CPU has:
>>> - min = 100.000 kHz
>>> - max = 1.000.000 kHz
>>> - boost = 1.200.000 kHz
>>>
>>> With boost enabled, the user requests:
>>> - scaling_min: 1.100.000
>>> - scaling_max: 1.200.000
>>>
>>> If boost is disabled, we will have:
>>> policy->min == policy->max == 1.000.000
>>> without notifying anybody.
>>>
>>> Ideally I assume it would be better to prevent the user from disabling
>>> boost without first asking to update the scaling_[min|max] frequencies,
>>> or at least detecting this case and have a warning message.
>>
>> I don't think this is a problem and doesn't really need special care.
>> It is the user who is disabling the boost feature, its okay to force
>> set to clamped values.
>>
>>> Please let me know if you prefer not adding the new qos constraint,
>>> I ll try harder not to have it if yes.
>>
>> But even with that (the issue pointed earlier not being a problem), I
>> think a new constraint for boost does make the code cleaner and easy
>> to follow.
>>
>> Rafael ?
>
> I agree.
>
An explicitly defined QoS helps make the code cleaner and easy to follow.
I agree too. Let's do it that way.
Powered by blists - more mailing lists