From: Mel Gorman <mgorman@techsingularity.net>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Matt Fleming <matt@codeblueprint.co.uk>,
Mel Gorman <mgorman@techsingularity.net>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 0/4] Reduce scheduler migrations due to wake_affine
Date: Mon, 18 Dec 2017 09:43:23 +0000 [thread overview]
Message-ID: <20171218094327.19562-1-mgorman@techsingularity.net> (raw)
wake_affine has the impossible task of figuring out when it's best for a
waker to pull a wakee towards the wakers CPU on the expectation that data
locality will offset the migration. It's hurt by the fact that most wakeups
cannot run on the current CPU to avoid stacking multiple tasks on one CPU
by accident so it depends heavily on topology and which CPU nearby is idle.
This series special cases some wake_affine decisions.
Patch 1 was already posted but is a pre-requisite for the other patches. It
avoids wake_affine pulling a task to a different node if the wakeup
source is an interrupt. This is on the basis that we have little
knowledge of whather the CPU servicing the interrupt is relevant
to the data locality of the task being woken. The data from the
interrupt itself may be a tiny proportion of the tasks working
set.
Patch 2 notes that a previous CPU that is idle and cache affine with
the waker is probably a suitable idle sibling and that a search
in select_idle_sibling can be avoided.
Patch 3 just adds a comment for someone who doesn't know the history of
sync wakeups
Patch 4 special cases kworkers that run on a specific CPU as they can have
a synchronous relationship between waker and wakee
The changelog includes some data but results would also be highly machine
specific. For example, I noted a relatively small improvement from patch
1 while Mike Galbraith reported a significant gain on a different machine
for the same workload. YMMV.
kernel/sched/fair.c | 108 +++++++++++++++++++++++++++++++++++++++---------
kernel/sched/features.h | 8 ++++
2 files changed, 96 insertions(+), 20 deletions(-)
--
2.15.0
next reply other threads:[~2017-12-18 9:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 9:43 Mel Gorman [this message]
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
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=20171218094327.19562-1-mgorman@techsingularity.net \
--to=mgorman@techsingularity.net \
--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 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.