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: <8ea80393-866e-9c31-85e9-46d738d24047@arm.com>
Date:   Tue, 22 Mar 2022 10:37:43 +0100
From:   Dietmar Eggemann <dietmar.eggemann@....com>
To:     Vincent Donnefort <vincent.donnefort@....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
Subject: Re: [PATCH v3 7/7] sched/fair: Remove the energy margin in feec()

On 08/03/2022 19:19, Vincent Donnefort wrote:

[...]

> 1. The energy estimation is not a good absolute value:
> 
> The function, compute_energy() used in feec() is a good estimation for

s/The function, compute_energy()/compute_energy() ... shorter

[...]

> util_avg represents integrates the near history for a CPU usage,

s/util_avg represents integrates/util_avg contains ?

[...]

> 2. The margin handicaps small tasks:
> 
> On a system where the workload is composed mostly of small tasks (which is
> often the case on Android), the overall energy will be high enough to
> create a margin none of those tasks can cross. e.g. On a Pixel4, a small

s/e.g.// ?

[...]

> Without a margin, we could have feared bouncing between CPUs. But running
> LISA's eas_behaviour test coverage on three different platforms (Hikey960,
> RB-5 and DB-845) showed no issue and even fixed previously known failures.

Can you be more specific what those fixes are? I think you mention (some
of) them in the cover letter. It's just that when somebody will read
this patch, once it's in, this information is not there.

You could also add
https://developer.arm.com/tools-and-software/open-source-software/linux-kernel/energy-aware-scheduling/eas-mainline-development
to the cover letter so people can get more information about those EAS
behaviour tests.

[...]

> @@ -6736,7 +6736,6 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu)
>  	struct root_domain *rd = cpu_rq(smp_processor_id())->rd;
>  	int cpu, best_energy_cpu = prev_cpu, target = -1;

Nit-picking: IMHO, best_energy_cpu doesn't have to be initialized
anymore since we only use it now when `best_delta < prev_delta`,
hence best_energy_cpu has to be set at least once.

[...]

> @@ -6851,12 +6849,7 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu)
>  	}
>  	rcu_read_unlock();
>  
> -	/*
> -	 * Pick the best CPU if prev_cpu cannot be used, or if it saves at
> -	 * least 6% of the energy used by prev_cpu.
> -	 */
> -	if ((prev_delta == ULONG_MAX) ||
> -	    (prev_delta - best_delta) > ((prev_delta + base_energy) >> 4))
> +	if (best_delta < prev_delta)
>  		target = best_energy_cpu;
>  
>  	return target;

Can we now move the `unlock:` before the first rcu_read_unlock()?
All error case have best_delta and prev_delta = ULONG_MAX so we return
`target = -1` or `target = prev_cpu` correctly.

@@ -6960,17 +6960,13 @@ static int find_energy_efficient_cpu(struct
task_struct *p, int prev_cpu)
                        }
                }
        }
+unlock:
        rcu_read_unlock();
         if (best_delta < prev_delta)
                target = best_energy_cpu;
         return target;
-
-unlock:
-       rcu_read_unlock();
-
-       return target;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ