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, 6 Sep 2017 12:51:31 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Chris Wilson <chris@...is-wilson.co.uk>
Cc:     Andy Lutomirski <luto@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Abysmal scheduler performance in Linus' tree?

On Wed, Sep 06, 2017 at 12:44:20PM +0200, Peter Zijlstra wrote:
> > > +       /* if this cache has capacity, come here */
> > > +       if (this_stats.has_capacity && this_stats.nr_running < prev_stats.nr_running+1)
> > > +               return true;
> > 
> > This is still not working as intended, it should be 
> > 
> > 	if (this_stats.has_capacity && this_stats.nr_running+1 < prev_stats.nr_running)
> > 		return true;
> > 
> > to fix the regression.
> 
> Argh, you're quite right. Let me do a patch for that.

---
Subject: sched/fair: Fix wake_affine_llc() balance rules
From: Peter Zijlstra <peterz@...radead.org>
Date: Wed Sep  6 12:45:45 CEST 2017

Chris reported that the SMT balance rules got the +1 on the wrong
side, resulting in a bias towards the current LLC; which the
load-balancer would then try and undo.

Reported-by: Chris Wilson <chris@...is-wilson.co.uk>
Fixes: 90001d67be2f ("sched/fair: Fix wake_affine() for !NUMA_BALANCING")
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
---
 kernel/sched/fair.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5435,7 +5435,7 @@ wake_affine_llc(struct sched_domain *sd,
 		return false;
 
 	/* if this cache has capacity, come here */
-	if (this_stats.has_capacity && this_stats.nr_running < prev_stats.nr_running+1)
+	if (this_stats.has_capacity && this_stats.nr_running+1 < prev_stats.nr_running)
 		return true;
 
 	/*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ