All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Andy Lutomirski <luto@kernel.org>, Ingo Molnar <mingo@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Abysmal scheduler performance in Linus' tree?
Date: Wed, 6 Sep 2017 12:44:20 +0200	[thread overview]
Message-ID: <20170906104420.ic5lbpacpyyz53w5@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <150469312649.28581.17626550155735691534@mail.alporthouse.com>

On Wed, Sep 06, 2017 at 11:18:46AM +0100, Chris Wilson wrote:

> > +static void get_llc_stats(struct llc_stats *stats, int cpu)
> > +{
> > +       struct sched_domain_shared *sds = rcu_dereference(per_cpu(sd_llc_shared, cpu));
> > +
> > +       if (!sds) {
> > +               memset(&stats, 0, sizeof(*stats));
> 
> Yes, I even sent you a mail about it ;)

Bah, too much email, sorry :-(

> > +       /*
> > +        * The has_capacity stuff is not SMT aware, but by trying to balance
> > +        * the nr_running on both ends we try and fill the domain at equal
> > +        * rates, thereby first consuming cores before siblings.
> > +        */
> > +
> > +       /* if the old cache has capacity, stay there */
> > +       if (prev_stats.has_capacity && prev_stats.nr_running < this_stats.nr_running+1)
> > +               return false;
> > +
> > +       /* 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.

  parent reply	other threads:[~2017-09-06 10:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-06  5:13 Abysmal scheduler performance in Linus' tree? Andy Lutomirski
2017-09-06  8:25 ` Peter Zijlstra
2017-09-06  8:59   ` Andy Lutomirski
2017-09-06  9:03     ` Peter Zijlstra
2017-09-06 16:14       ` Peter Zijlstra
2017-09-07  6:15         ` Mike Galbraith
2017-09-07  7:31           ` Ingo Molnar
2017-09-07  9:13           ` [PATCH] sched/cpuset/pm: Fix cpuset vs suspend-resume Peter Zijlstra
2017-09-07  9:26             ` Peter Zijlstra
2017-09-07 10:54               ` Rafael J. Wysocki
2017-09-07 20:38               ` Tejun Heo
2017-09-07 10:33             ` [tip:sched/urgent] sched/cpuset/pm: Fix cpuset vs. suspend-resume bugs tip-bot for Peter Zijlstra
2017-09-06  9:15 ` Abysmal scheduler performance in Linus' tree? Chris Wilson
2017-09-06  9:24   ` Peter Zijlstra
     [not found]     ` <150469312649.28581.17626550155735691534@mail.alporthouse.com>
2017-09-06 10:44       ` Peter Zijlstra [this message]
2017-09-06 10:51         ` Peter Zijlstra
2017-09-07  8:16           ` [tip:sched/urgent] sched/fair: Fix wake_affine_llc() balancing rules tip-bot for Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170906104420.ic5lbpacpyyz53w5@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.