From: Brendan Jackman <brendan.jackman@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] sched/fair: remote load updates for idle CPUs
Date: Tue, 24 Oct 2017 13:25:54 +0100 [thread overview]
Message-ID: <20171024122556.15872-1-brendan.jackman@arm.com> (raw)
Until a NOHZ idle balance takes place on behalf of a CPU (which may
never happen), the blocked load and shares of its root cfs_rq are
updated only by that CPU. That means if a CPU goes suddenly from
being busy to totally idle, its load and shares may not be updated
for a long time.
Schedutil works around this problem by ignoring the util of CPUs
that were last updated more than a tick ago. However the stale
load does impact task placement: elements that look at load and
util (in particular the slow-path of select_task_rq_fair) can
leave the idle CPUs un-used while other CPUs go unnecessarily
overloaded. Furthermore the stale shares can impact CPU time
allotment.
Two complementary solutions are proposed here:
1. When a task wakes up, if necessary an idle CPU is woken as if to
perform a NOHZ idle balance, which is then aborted once the load
of NOHZ idle CPUs has been updated. This solves the problem but
brings with it extra CPU wakeups, which have an energy cost.
2. During newly-idle load balancing, the load of remote nohz-idle
CPUs in the sched_domain is updated. When all of the idle CPUs
were updated in that step, the nohz.next_update field
is pushed further into the future. This field is used to determine
the need for triggering the newly-added NOHZ kick. So if such
newly-idle balances are happening often enough, no additional CPU
wakeups are required to keep all the CPUs' loads updated.
Brendan Jackman (1):
sched/fair: Update blocked load from newly idle balance
Vincent Guittot (1):
sched: force update of blocked load of idle cpus
kernel/sched/core.c | 1 +
kernel/sched/fair.c | 109 ++++++++++++++++++++++++++++++++++++++++++++-------
kernel/sched/sched.h | 2 +
3 files changed, 98 insertions(+), 14 deletions(-)
--
2.14.1
next reply other threads:[~2017-10-24 12:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-24 12:25 Brendan Jackman [this message]
2017-10-24 12:25 ` [PATCH 1/2] sched: force update of blocked load of idle cpus Brendan Jackman
2017-11-09 19:56 ` Todd Kjos
2017-11-10 14:53 ` Brendan Jackman
2017-11-20 9:04 ` Vincent Guittot
2017-11-30 15:59 ` Brendan Jackman
2017-10-24 12:25 ` [PATCH 2/2] sched/fair: Update blocked load from newly idle balance Brendan Jackman
2017-11-20 9:07 ` Vincent Guittot
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=20171024122556.15872-1-brendan.jackman@arm.com \
--to=brendan.jackman@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.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
all inboxes | Powered by JetHome®