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/1] Reduce scheduler migrations due to wake_affine
Date: Tue, 19 Dec 2017 08:59:46 +0000 [thread overview]
Message-ID: <20171219085947.13136-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 and is simply being reposted as other parts of
the series were dropped. 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.
The wake-on-prev patch got dropped as the initial version had a serious bug.
Once corrected, it does reduce migrations and reduces overhead in some cases
by avoiding wake_affine_weight. However, it's not a universal win across a
range of machines and workloads and when it's a win, it's marginal while
being potentially confusing the role of select_idle_sibling in selecting
prev_cpu if it turns out to be idle. The kworker stacking patch got dropped
as it could not guarantee the relationship was synchronous and may introduce
other regressions. I'll revisit migration mitigation after the Christmas
assuming I get the chance. However, patch 1 still makes sense and known
to address a number of issues so it should be relatively safe.
kernel/sched/fair.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
--
2.15.0
next reply other threads:[~2017-12-19 9:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 8:59 Mel Gorman [this message]
2017-12-19 8:59 ` [PATCH 1/1] sched: Only immediately migrate tasks due to interrupts if prev and target CPUs share cache Mel Gorman
2018-01-10 12:16 ` [tip:sched/core] sched/fair: " tip-bot for 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=20171219085947.13136-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox