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] [thread-next>] [day] [month] [year] [list]
Message-ID: <870445a1-1148-e5d1-08f8-df630466d788@linuxfoundation.org>
Date:   Thu, 9 Sep 2021 16:26:06 -0600
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Huang Rui <ray.huang@....com>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Borislav Petkov <bp@...e.de>, Ingo Molnar <mingo@...nel.org>,
        linux-pm@...r.kernel.org
Cc:     Deepak Sharma <deepak.sharma@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Mario Limonciello <mario.limonciello@....com>,
        Nathan Fontenot <nathan.fontenot@....com>,
        Jinzhou Su <Jinzhou.Su@....com>,
        Xiaojian Du <Xiaojian.Du@....com>,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH 15/19] cpupower: add amd-pstate sysfs entries into
 libcpufreq

On 9/8/21 8:59 AM, Huang Rui wrote:
> These amd-pstate sysfs entries will be used on cpupower for amd-pstate
> kernel module.
> 

This commit log doesn't make sense. If these sysfs entries are used
for amd-pstate kernel module, why are they defined here.

Describe how these are used and the relationship between these defines
and the amd-pstate kernel module

> Signed-off-by: Huang Rui <ray.huang@....com>
> ---
>   tools/power/cpupower/lib/cpufreq.c | 18 +++++++++++++++++-
>   1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/power/cpupower/lib/cpufreq.c b/tools/power/cpupower/lib/cpufreq.c
> index c3b56db8b921..3f92ddadaad2 100644
> --- a/tools/power/cpupower/lib/cpufreq.c
> +++ b/tools/power/cpupower/lib/cpufreq.c
> @@ -69,6 +69,14 @@ enum cpufreq_value {
>   	SCALING_MIN_FREQ,
>   	SCALING_MAX_FREQ,
>   	STATS_NUM_TRANSITIONS,
> +	AMD_PSTATE_HIGHEST_PERF,
> +	AMD_PSTATE_NOMINAL_PERF,
> +	AMD_PSTATE_LOWEST_NONLINEAR_PERF,
> +	AMD_PSTATE_LOWEST_PERF,
> +	AMD_PSTATE_MAX_FREQ,
> +	AMD_PSTATE_NOMINAL_FREQ,
> +	AMD_PSTATE_LOWEST_NONLINEAR_FREQ,
> +	AMD_PSTATE_MIN_FREQ,
>   	MAX_CPUFREQ_VALUE_READ_FILES
>   };
>   

These are AMD specific values being added to a common code.

> @@ -80,7 +88,15 @@ static const char *cpufreq_value_files[MAX_CPUFREQ_VALUE_READ_FILES] = {
>   	[SCALING_CUR_FREQ] = "scaling_cur_freq",
>   	[SCALING_MIN_FREQ] = "scaling_min_freq",
>   	[SCALING_MAX_FREQ] = "scaling_max_freq",
> -	[STATS_NUM_TRANSITIONS] = "stats/total_trans"
> +	[STATS_NUM_TRANSITIONS] = "stats/total_trans",
> +	[AMD_PSTATE_HIGHEST_PERF] = "amd_pstate_highest_perf",
> +	[AMD_PSTATE_NOMINAL_PERF] = "amd_pstate_nominal_perf",
> +	[AMD_PSTATE_LOWEST_NONLINEAR_PERF] = "amd_pstate_lowest_nonlinear_perf",
> +	[AMD_PSTATE_LOWEST_PERF] = "amd_pstate_lowest_perf",
> +	[AMD_PSTATE_MAX_FREQ] = "amd_pstate_max_freq",
> +	[AMD_PSTATE_NOMINAL_FREQ] = "amd_pstate_nominal_freq",
> +	[AMD_PSTATE_LOWEST_NONLINEAR_FREQ] = "amd_pstate_lowest_nonlinear_freq",
> +	[AMD_PSTATE_MIN_FREQ] = "amd_pstate_min_freq"
>   };
>   
>   
> 

These are AMD specific values being added to a common code.
It doesn't sound right. What happens if there is a conflict
between AMD values and another vendor values?

This doesn't seem a good place to add these.

thanks,
-- Shuah


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ