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:   Thu, 25 Feb 2021 12:46:30 +0100
From:   Dietmar Eggemann <dietmar.eggemann@....com>
To:     vincent.donnefort@....com, peterz@...radead.org, mingo@...hat.com,
        vincent.guittot@...aro.org
Cc:     linux-kernel@...r.kernel.org, qperret@...gle.com,
        patrick.bellasi@...bug.net, valentin.schneider@....com
Subject: Re: [PATCH v2 2/2] sched/fair: use lsub_positive in cpu_util_next()

On 25/02/2021 09:36, vincent.donnefort@....com wrote:
> From: Vincent Donnefort <vincent.donnefort@....com>
> 
> The sub_positive local version is saving an explicit load-store and is
> enough for the cpu_util_next() usage.
> 
> Signed-off-by: Vincent Donnefort <vincent.donnefort@....com>
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 146ac9fec4b6..1364f8b95214 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6525,7 +6525,7 @@ static unsigned long cpu_util_next(int cpu, struct task_struct *p, int dst_cpu)
>  	 * util_avg should already be correct.
>  	 */
>  	if (task_cpu(p) == cpu && dst_cpu != cpu)
> -		sub_positive(&util, task_util(p));
> +		lsub_positive(&util, task_util(p));
>  	else if (task_cpu(p) != cpu && dst_cpu == cpu)
>  		util += task_util(p);

Reviewed-by: Dietmar Eggemann <dietmar.eggemann@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ