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]
Date:   Wed, 30 Aug 2023 21:16:57 +0800
From:   Chen Yu <yu.c.chen@...el.com>
To:     Shrikanth Hegde <sshegde@...ux.vnet.ibm.com>
CC:     <mingo@...hat.com>, <peterz@...radead.org>,
        <vincent.guittot@...aro.org>, <dietmar.eggemann@....com>,
        <vschneid@...hat.com>, <linux-kernel@...r.kernel.org>,
        <ionela.voinescu@....com>, <quentin.perret@....com>,
        <srikar@...ux.vnet.ibm.com>, <mgorman@...hsingularity.net>,
        <mingo@...nel.org>
Subject: Re: [PATCH] sched/topology: remove sysctl_sched_energy_aware
 depending on the architecture

Hi Shrikanth,

On 2023-08-29 at 12:20:40 +0530, Shrikanth Hegde wrote:
> Currently sysctl_sched_energy_aware doesn't alter the said behaviour on
> some of the architectures. IIUC its meant to either force rebuild the
> perf domains or cleanup the perf domains by echoing 1 or 0 respectively.
> 
> perf domains are not built when there is SMT, or when there is no
> Asymmetric CPU topologies or when there is no frequency invariance.
> Since such cases EAS is not set and perf domains are not built. By
> changing the values of sysctl_sched_energy_aware, its not possible to
> force build the perf domains. Hence remove this sysctl on such platforms
> that dont support it at boot. Some of the settings can be changed later
> such as smt_active by offlining the CPU's, In those cases
> build_perf_domains returns true, in that case re-enable the sysctl.
> 
> Signed-off-by: Shrikanth Hegde <sshegde@...ux.vnet.ibm.com>
>

[snip...]
 
> @@ -380,15 +400,11 @@ static bool build_perf_domains(const struct cpumask *cpu_map)
>  	struct cpufreq_policy *policy;
>  	struct cpufreq_governor *gov;
> 
> -	if (!sysctl_sched_energy_aware)
> -		goto free;
> -

I tried to ramp up the EAS and maybe I overlooked it, why do we remove above
check? If the system boots with EAS enabled and sysctl_sched_energy_aware
set to 1, then the user wants to disable EAS then changing sysctl_sched_energy_aware
to 0. Without above check, how could the perf domain be freed?

thanks,
Chenyu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ