From: tip-bot for Vladimir Davydov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
peterz@infradead.org, tglx@linutronix.de, vdavydov@parallels.com
Subject: [tip:sched/core] sched/balancing: Prevent the reselection of a previous env.dst_cpu if some tasks are pinned
Date: Fri, 20 Sep 2013 06:47:09 -0700 [thread overview]
Message-ID: <tip-7aff2e3a56b724b79fa2d5abd10d8231ef8fb0c5@git.kernel.org> (raw)
In-Reply-To: <281f59b6e596c718dd565ad267fc38f5b8e5c995.1379265590.git.vdavydov@parallels.com>
Commit-ID: 7aff2e3a56b724b79fa2d5abd10d8231ef8fb0c5
Gitweb: http://git.kernel.org/tip/7aff2e3a56b724b79fa2d5abd10d8231ef8fb0c5
Author: Vladimir Davydov <vdavydov@parallels.com>
AuthorDate: Sun, 15 Sep 2013 21:30:13 +0400
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 20 Sep 2013 12:02:20 +0200
sched/balancing: Prevent the reselection of a previous env.dst_cpu if some tasks are pinned
Currently new_dst_cpu is prevented from being reselected actually, not
dst_cpu. This can result in attempting to pull tasks to this_cpu twice.
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/281f59b6e596c718dd565ad267fc38f5b8e5c995.1379265590.git.vdavydov@parallels.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/fair.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 71c6ef5..0784ab6 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5261,15 +5261,15 @@ more_balance:
*/
if ((env.flags & LBF_DST_PINNED) && env.imbalance > 0) {
+ /* Prevent to re-select dst_cpu via env's cpus */
+ cpumask_clear_cpu(env.dst_cpu, env.cpus);
+
env.dst_rq = cpu_rq(env.new_dst_cpu);
env.dst_cpu = env.new_dst_cpu;
env.flags &= ~LBF_DST_PINNED;
env.loop = 0;
env.loop_break = sched_nr_migrate_break;
- /* Prevent to re-select dst_cpu via env's cpus */
- cpumask_clear_cpu(env.dst_cpu, env.cpus);
-
/*
* Go back to "more_balance" rather than "redo" since we
* need to continue with same src_cpu.
prev parent reply other threads:[~2013-09-20 13:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-15 17:30 [PATCH 1/2] sched: load_balance: Prevent reselect prev dst_cpu if some pinned Vladimir Davydov
2013-09-15 17:30 ` [PATCH 2/2] sched: load_balance: Reset env when going to redo due to all pinned Vladimir Davydov
2013-09-16 5:43 ` Peter Zijlstra
2013-09-16 8:08 ` Vladimir Davydov
2013-09-16 8:16 ` Peter Zijlstra
2013-09-16 8:08 ` [PATCH 1/2] sched: load_balance: Prevent reselect prev dst_cpu if some pinned Peter Zijlstra
2013-09-20 13:47 ` tip-bot for Vladimir Davydov [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=tip-7aff2e3a56b724b79fa2d5abd10d8231ef8fb0c5@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vdavydov@parallels.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