lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b059212-0fc7-4bb1-a759-11ea24b58906@nvidia.com>
Date: Thu, 8 Jan 2026 19:34:51 +0530
From: Sumit Gupta <sumitg@...dia.com>
To: "zhenglifeng (A)" <zhenglifeng1@...wei.com>, rafael@...nel.org,
 viresh.kumar@...aro.org, lenb@...nel.org, robert.moore@...el.com,
 corbet@....net, pierre.gondois@....com, rdunlap@...radead.org,
 ray.huang@....com, gautham.shenoy@....com, mario.limonciello@....com,
 perry.yuan@....com, ionela.voinescu@....com, zhanjie9@...ilicon.com,
 linux-pm@...r.kernel.org, linux-acpi@...r.kernel.org,
 linux-doc@...r.kernel.org, acpica-devel@...ts.linux.dev,
 linux-kernel@...r.kernel.org
Cc: linux-tegra@...r.kernel.org, treding@...dia.com, jonathanh@...dia.com,
 vsethi@...dia.com, ksitaraman@...dia.com, sanjayc@...dia.com,
 nhartman@...dia.com, bbasu@...dia.com, sumitg@...dia.com
Subject: Re: [PATCH v5 11/11] cpufreq: CPPC: add autonomous mode boot
 parameter support


On 26/12/25 13:33, zhenglifeng (A) wrote:
> External email: Use caution opening links or attachments
>
>
> On 2025/12/23 20:13, Sumit Gupta wrote:
>> Add kernel boot parameter 'cppc_cpufreq.auto_sel_mode' to enable CPPC
>> autonomous performance selection on all CPUs at system startup without
>> requiring runtime sysfs manipulation. When autonomous mode is enabled,
>> the hardware automatically adjusts CPU performance based on workload
>> demands using Energy Performance Preference (EPP) hints.
>>
>> When auto_sel_mode=1:
>> - All CPUs are configured for autonomous operation during init
>> - EPP is set to performance preference (0x0) by default
>> - Min/max performance bounds use defaults or already set values
>> - CPU frequency scaling is handled by hardware instead of OS governor
>>
>> The boot parameter is applied only during first policy initialization.
>> User's runtime sysfs configuration is preserved across hotplug.
>>
>> For Documentation/:
>> Reviewed-by: Randy Dunlap <rdunlap@...radead.org>
>> Signed-off-by: Sumit Gupta <sumitg@...dia.com>
>> ---
>>   .../admin-guide/kernel-parameters.txt         | 13 +++
>>   drivers/cpufreq/cppc_cpufreq.c                | 85 +++++++++++++++++--
>>   2 files changed, 90 insertions(+), 8 deletions(-)
>>
>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
>> index aab72efa1acd..450f0b0225dc 100644
>> --- a/Documentation/admin-guide/kernel-parameters.txt
>> +++ b/Documentation/admin-guide/kernel-parameters.txt
>> @@ -1035,6 +1035,19 @@ Kernel parameters
>>                        Format:
>>                        <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>]
>>
>> +     cppc_cpufreq.auto_sel_mode=
>> +                     [CPU_FREQ] Enable ACPI CPPC autonomous performance
>> +                     selection. When enabled, hardware automatically adjusts
>> +                     CPU frequency on all CPUs based on workload demands.
>> +                     In Autonomous mode, Energy Performance Preference (EPP)
>> +                     hints guide hardware toward performance (0x0) or energy
>> +                     efficiency (0xff).
>> +                     Requires ACPI CPPC autonomous selection register support.
>> +                     Format: <bool>
>> +                     Default: 0 (disabled)
>> +                     0: use cpufreq governors
>> +                     1: enable if supported by hardware
>> +
>>        cpuidle.off=1   [CPU_IDLE]
>>                        disable the cpuidle sub-system
>>
>> diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
>> index b3da263c18b0..8c6869e68504 100644
>> --- a/drivers/cpufreq/cppc_cpufreq.c
>> +++ b/drivers/cpufreq/cppc_cpufreq.c
>> @@ -30,6 +30,9 @@ static struct cpufreq_driver cppc_cpufreq_driver;
>>
>>   static DEFINE_MUTEX(cppc_cpufreq_update_autosel_config_lock);
>>
>> +/* Autonomous Selection boot parameter */
>> +static bool auto_sel_mode;
>> +
>>   #ifdef CONFIG_ACPI_CPPC_CPUFREQ_FIE
>>   static enum {
>>        FIE_UNSET = -1,
>> @@ -643,11 +646,16 @@ static int cppc_cpufreq_set_mperf_limit(struct cpufreq_policy *policy, u64 val,
>>    * cppc_cpufreq_update_autosel_config - Update autonomous selection config
>>    * @policy: cpufreq policy
>>    * @is_auto_sel: enable/disable autonomous selection
>> + * @epp_val: EPP value (used only if update_epp true)
>> + * @update_epp: whether to update EPP register
>> + * @update_policy: whether to update policy constraints
>>    *
>>    * Return: 0 on success, negative error code on failure
>>    */
>>   static int cppc_cpufreq_update_autosel_config(struct cpufreq_policy *policy,
>> -                                           bool is_auto_sel)
>> +                                           bool is_auto_sel, u32 epp_val,
>> +                                           bool update_epp,
>> +                                           bool update_policy)
> cppc_cpufreq_set_mperf_limit() and cppc_cpufreq_update_autosel_config()
> have too much bool input param. Just break them down into several separate
> functions and call them only when needed. These two functions are now too
> hard to read.

Sure, will break them and open code in v6.

Thank you,
Sumit Gupta

....



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ