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:   Tue, 31 May 2022 10:17:01 +0200
From:   Dietmar Eggemann <dietmar.eggemann@....com>
To:     Vincent Donnefort <vdonnefort@...gle.com>, peterz@...radead.org,
        mingo@...hat.com, vincent.guittot@...aro.org
Cc:     linux-kernel@...r.kernel.org, morten.rasmussen@....com,
        chris.redpath@....com, qperret@...gle.com, tao.zhou@...ux.dev,
        kernel-team@...roid.com
Subject: Re: [PATCH v9 6/7] sched/fair: Remove task_util from effective
 utilization in feec()

- Vincent Donnefort <vincent.donnefort@....com>

On 23/05/2022 17:51, Vincent Donnefort wrote:
> From: Vincent Donnefort <vincent.donnefort@....com>

[...]

> @@ -6834,22 +6887,36 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu)
>  	if (!task_util_est(p))
>  		goto unlock;
>  
> +	eenv_task_busy_time(&eenv, p, prev_cpu);
> +
>  	for (; pd; pd = pd->next) {
> -		unsigned long cur_delta, spare_cap, max_spare_cap = 0;
> +		unsigned long cpu_cap, cpu_thermal_cap, util;
> +		unsigned long cur_delta, max_spare_cap = 0;
>  		bool compute_prev_delta = false;
>  		unsigned long base_energy_pd;
>  		int max_spare_cap_cpu = -1;
>  
>  		cpumask_and(cpus, perf_domain_span(pd), cpu_online_mask);

Internal EAS testing of this patch-set version has revealed that this
doesn't work against LTP CPU hotplug stress test. `struct cpumask *cpus`
can't be used when it is empty. This can happen in case all PD CPUs are
hotplugged out since we `and` the invariant PD cpumask with
cpu_online_mask. We need a:

+               if (cpumask_empty(cpus))
+                       continue;
+

here.

> -		for_each_cpu_and(cpu, cpus, sched_domain_span(sd)) {
> +		/* Account thermal pressure for the energy estimation */
> +		cpu = cpumask_first(cpus);
> +		cpu_thermal_cap = arch_scale_cpu_capacity(cpu);
> +		cpu_thermal_cap -= arch_scale_thermal_pressure(cpu);

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ