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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ecd2190d-09a2-4e7e-a076-08f517fe20de@arm.com>
Date: Mon, 24 Feb 2025 11:24:51 +0100
From: Pierre Gondois <pierre.gondois@....com>
To: Sumit Gupta <sumitg@...dia.com>, rafael@...nel.org,
 viresh.kumar@...aro.org, lenb@...nel.org, robert.moore@...el.com,
 corbet@....net, 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,
 sashal@...dia.com, vsethi@...dia.com, ksitaraman@...dia.com,
 sanjayc@...dia.com, bbasu@...dia.com
Subject: Re: [Patch 3/5] ACPI: CPPC: support updating epp, auto_sel and
 {min|max_perf} from sysfs

Hello Sumit,

On 2/11/25 11:37, Sumit Gupta wrote:
> Add support to update the CPC registers used for Autonomous
> Performance Level Selection from acpi_cppc sysfs store nodes.
> Registers supported for updation are:
> - Engergy Performance Preference (EPP): energy_perf
> - Autonomous Selection: auto_sel
> - Maximum Performance: max_perf
> - Minimum Performance: min_perf
> 
> Also, enable show nodes to read of the following CPC registers:
> - Performance Limited: perf_limited
> - Autonomous Activity Window: auto_activity_window
> 
> Signed-off-by: Sumit Gupta <sumitg@...dia.com>
> ---
>   drivers/acpi/cppc_acpi.c | 191 ++++++++++++++++++++++++++++++++++++---
>   include/acpi/cppc_acpi.h |   5 +
>   2 files changed, 183 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
> index cc2bf958e84f..c60ad66ece85 100644
> --- a/drivers/acpi/cppc_acpi.c
> +++ b/drivers/acpi/cppc_acpi.c

[...]

>   sysfs_cppc_data(cppc_get_perf_caps, cppc_perf_caps, highest_perf, ro);
>   sysfs_cppc_data(cppc_get_perf_caps, cppc_perf_caps, lowest_perf, ro);
>   sysfs_cppc_data(cppc_get_perf_caps, cppc_perf_caps, nominal_perf, ro);
> @@ -177,9 +304,16 @@ sysfs_cppc_data(cppc_get_perf_caps, cppc_perf_caps, lowest_nonlinear_perf, ro);
>   sysfs_cppc_data(cppc_get_perf_caps, cppc_perf_caps, guaranteed_perf, ro);
>   sysfs_cppc_data(cppc_get_perf_caps, cppc_perf_caps, lowest_freq, ro);
>   sysfs_cppc_data(cppc_get_perf_caps, cppc_perf_caps, nominal_freq, ro);
> +sysfs_cppc_data(cppc_get_perf_caps, cppc_perf_caps, auto_sel, rw);
>   
>   sysfs_cppc_data(cppc_get_perf_fb_ctrs, cppc_perf_fb_ctrs, reference_perf, ro);
>   sysfs_cppc_data(cppc_get_perf_fb_ctrs, cppc_perf_fb_ctrs, wraparound_time, ro);
> +sysfs_cppc_data(cppc_get_perf_fb_ctrs, cppc_perf_fb_ctrs, perf_limited, ro);
> +
> +sysfs_cppc_data(cppc_get_perf_ctrls, cppc_perf_ctrls, min_perf, rw);
> +sysfs_cppc_data(cppc_get_perf_ctrls, cppc_perf_ctrls, max_perf, rw);

IIUC, this means that users can modify the min/max performance levels of the CPU
without having the cpufreq framework notified. Meaning that if a user modifies these
levels, the frequency selection will be done using the initial min/max performance
level.
I think it would be better not allow users to modifies these values directly. Reliying
on existing scaling_min_freq/scaling_max_freq files would be better IMO.

Regards,
Pierre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ