public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Joel Fernandes <joelaf@google.com>, Rik van Riel <riel@redhat.com>
Cc: kernel test robot <xiaolong.ye@intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Josef Bacik <jbacik@fb.com>, Juri Lelli <Juri.Lelli@arm.com>,
	Brendan Jackman <brendan.jackman@arm.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Matt Fleming <matt@codeblueprint.co.uk>,
	Ingo Molnar <mingo@redhat.com>,
	lkp@01.org
Subject: Re: [lkp-robot] [sched/fair] 6d46bd3d97: netperf.Throughput_tps -11.3% regression
Date: Sun, 17 Sep 2017 18:47:49 +0200	[thread overview]
Message-ID: <1505666869.15333.110.camel@gmx.de> (raw)
In-Reply-To: <CAJWu+orNk7vnZRi5gdLOQxjBS4kKZ3vSkp1-=xOd+qMaiG08VA@mail.gmail.com>

On Sat, 2017-09-16 at 23:42 -0700, Joel Fernandes wrote:
> 
> Yes I understand. However with my 'strong sync' patch, such a
> balancing check could be useful which is what I was trying to do in a
> different way in my patch - but it could be that my way is not good
> enough and potentially the old wake_affine check could help here

Help how?  The old wake_affine() check contained zero concurrency
information, it served to exclude excessive stacking, defeating the
purpose of SMP.  A truly synchronous wakeup has absolutely nothing to
do with load balance in the general case: you can neither generate nor
cure an imbalance by replacing one (nice zero) task with another.  The
mere existence of a load based braking mechanism speaks volumes.

> On systems with SMT, it may make more sense for
> > sync wakeups to look for idle threads of the same
> > core, than to have the woken task end up on the
> > same thread, and wait for the current task to stop
> > running.
> 
> I am ok with additionally doing an select_idle_smt for the SMT cases.
> However Mike shows that it doesn't necessarily cause a performance
> improvement. But if there is consensus on checking for idle SMT
> threads, then I'm Ok with doing that.

select_idle_sibling() used to check thread first, that was changed to
core first for performance reasons.

> > "Strong sync" wakeups like you propose would also
> > change the semantics of wake_wide() and potentially
> > other bits of code...
> >
> 
> I understand, I am not very confident that wake_wide does the right
> thing anyway. Atleast for Android, wake_wide doesn't seem to mirror
> the most common usecase of display pipeline well. It seems that we
> have cases where the 'flip count' is really high and causes wake_wide
> all the time and sends us straight to the wake up slow path causing
> regressions in Android benchmarks.

Hm.  It didn't pull those counts out of the vacuum, it measured them.
 It definitely does not force Android into the full balance path, that
is being done by Android developers, as SD_BALANCE_WAKE is off by
default.  It was briefly on by default, but was quickly turned back off
because it... induced performance regressions.

In any case, if you have cause to believe that wake_wide() is causing
you grief, why the heck are you bending up the sync hint?

> Atleast with the sync flag, the caller provides a meaningful
> indication and I think making that flag stronger / more preferred than
> wake_wide makes sense from that perspective since its not a signal
> that's guessed, but is rather an input request.

Sort of, if you disregard the history I mentioned...

https://www.youtube.com/watch?v=Yho1Eydh1mM :)

Lacking solid concurrency information to base your decision on, you'll
end up robbing Peter to pay Paul forever, you absolutely will stack
non-synchronous tasks, inducing needless latency hits and injuring
scalability.  We've been down that road.  $subject was a very small
sample of what lies down this path <bang bang bang>.

	-Mike

  reply	other threads:[~2017-09-17 16:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27  1:02 [PATCH RFC/RFT] sched/fair: Improve the behavior of sync flag Joel Fernandes
2017-08-27  5:44 ` Mike Galbraith
2017-08-27  6:08   ` Mike Galbraith
2017-08-27  6:39     ` Joel Fernandes
2017-08-27  7:16       ` Mike Galbraith
2017-08-27 18:07       ` Mike Galbraith
2017-08-28  5:27         ` Joel Fernandes
2017-08-28  6:10           ` Mike Galbraith
2017-08-28  6:47             ` Mike Galbraith
2017-08-28 16:20             ` Joel Fernandes
2017-08-28 17:17               ` Mike Galbraith
2017-08-27  6:19   ` Joel Fernandes
     [not found]   ` <CAJWu+ooAPiuS+C7Gos4+8G9+DAvQL8X7=63D8U=yVLJkywbF7Q@mail.gmail.com>
2017-08-27  6:57     ` Mike Galbraith
2017-09-10 13:40 ` [lkp-robot] [sched/fair] 6d46bd3d97: netperf.Throughput_tps -11.3% regression kernel test robot
2017-09-10 16:53   ` Joel Fernandes
2017-09-11  2:55     ` Mike Galbraith
2017-09-11  6:32       ` Joel Fernandes
2017-09-11  8:03         ` Mike Galbraith
2017-09-14 15:56         ` Rik van Riel
2017-09-15  4:06           ` Mike Galbraith
2017-09-17  6:42           ` Joel Fernandes
2017-09-17 16:47             ` Mike Galbraith [this message]
2017-09-17 21:41               ` Joel Fernandes
2017-09-18  5:30                 ` Mike Galbraith
2017-09-24 23:46                   ` Joel Fernandes

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=1505666869.15333.110.camel@gmx.de \
    --to=efault@gmx.de \
    --cc=Juri.Lelli@arm.com \
    --cc=brendan.jackman@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=jbacik@fb.com \
    --cc=joelaf@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=matt@codeblueprint.co.uk \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=xiaolong.ye@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox