mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Matt Fleming <matt@codeblueprint.co.uk>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/4] sched: Allow tasks to stack with a workqueue on the same CPU
Date: Mon, 18 Dec 2017 11:25:15 +0000	[thread overview]
Message-ID: <20171218112515.b6f5i6fjwsmz2575@techsingularity.net> (raw)
In-Reply-To: <1513593870.6876.27.camel@gmx.de>

On Mon, Dec 18, 2017 at 11:44:30AM +0100, Mike Galbraith wrote:
> On Mon, 2017-12-18 at 09:43 +0000, Mel Gorman wrote:
> > If tasks wake a kworker to do some work and is woken on completion and it
> > was a per-cpu kworker that was used then a situation can arise where the
> > current CPU is always active when the kworker is waking and select_idle_sibling
> > moves the task. This leads to a situation where a task moves around the socket
> > each time a kworker is used even through the relationship is effectively sync.
> > This patch special cases a kworker running on the same CPU. It has a noticable
> > impact on migrations and performance of dbench running with the XFS filesystem
> > but has no impact on ext4 as ext4 interacts with a kthread, not a kworker.
> 
> I think intentional stacking is a very bad idea unless you know with
> absolute certainty that waker/wakee are in fact 100% synchronous.  This
> is IMO the wrong way to go about combating the excessive bouncing, that
> can be achieved by simple ratelimiting.
> 

Grand, I thought the patch was a bit optimistic but was surprised at the
level of impact for a workload that really did have a synchronous
relationship between waker and wakee. Might be worth revisiting it in
the future, be it rate-limiting or some other mechanism.

Thanks.

-- 
Mel Gorman
SUSE Labs

      reply	other threads:[~2017-12-18 11:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18  9:43 [PATCH 0/4] Reduce scheduler migrations due to wake_affine Mel Gorman
2017-12-18  9:43 ` [PATCH 1/4] sched: Only immediately migrate tasks due to interrupts if prev and target CPUs share cache Mel Gorman
2017-12-18  9:43 ` [PATCH 2/4] sched: Allow a wakee to run on the prev_cpu if it is idle and cache-affine with the waker Mel Gorman
2017-12-18 10:26   ` Peter Zijlstra
2017-12-18 10:56     ` Mel Gorman
2017-12-18 10:59       ` Peter Zijlstra
2017-12-18  9:43 ` [PATCH 3/4] sched: Comment on why sync wakeups try to run on the current CPU Mel Gorman
2017-12-19 19:06   ` Peter Zijlstra
2017-12-19 20:25     ` Mel Gorman
2017-12-20  4:09     ` Mike Galbraith
2017-12-20  4:21       ` Mike Galbraith
2017-12-18  9:43 ` [PATCH 4/4] sched: Allow tasks to stack with a workqueue on the same CPU Mel Gorman
2017-12-18 10:44   ` Mike Galbraith
2017-12-18 11:25     ` Mel Gorman [this message]

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=20171218112515.b6f5i6fjwsmz2575@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@codeblueprint.co.uk \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome