[tg_shares_up rewrite v4 08/11] sched: update shares on idle_balance

Previous thread: [tg_shares_up rewrite v4 04/11] sched: fix load corruption from update_cfs_shares by Paul Turner on Monday, November 15, 2010 - 4:47 pm. (2 messages)

Next thread: [tg_shares_up rewrite v4 01/11] sched: rewrite tg_shares_up by Paul Turner on Monday, November 15, 2010 - 4:47 pm. (2 messages)
From: Paul Turner
Date: Monday, November 15, 2010 - 4:47 pm

Since shares updates are no longer expensive and effectively local, update them
at idle_balance().  This allows us to more quickly redistribute shares to
another cpu when our load becomes idle.

Signed-off-by: Paul Turner <pjt@google.com>

---
 kernel/sched_fair.c |    1 +
 1 file changed, 1 insertion(+)

Index: tip/kernel/sched_fair.c
===================================================================
--- tip.orig/kernel/sched_fair.c
+++ tip/kernel/sched_fair.c
@@ -3365,6 +3365,7 @@ static void idle_balance(int this_cpu, s
 	 */
 	raw_spin_unlock(&this_rq->lock);
 
+	update_shares(this_cpu);
 	for_each_domain(this_cpu, sd) {
 		unsigned long interval;
 		int balance = 1;


--

From: tip-bot for Paul Turner
Date: Thursday, November 18, 2010 - 7:12 am

Commit-ID:  c66eaf619c0c7937e9ded160ae83b5a7a6b19b56
Gitweb:     http://git.kernel.org/tip/c66eaf619c0c7937e9ded160ae83b5a7a6b19b56
Author:     Paul Turner <pjt@google.com>
AuthorDate: Mon, 15 Nov 2010 15:47:07 -0800
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 18 Nov 2010 13:27:49 +0100

sched: Update shares on idle_balance

Since shares updates are no longer expensive and effectively local, update them
at idle_balance().  This allows us to more quickly redistribute shares to
another cpu when our load becomes idle.

Signed-off-by: Paul Turner <pjt@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20101115234938.204191702@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/sched_fair.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 6c84439..33f941d 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -3343,6 +3343,7 @@ static void idle_balance(int this_cpu, struct rq *this_rq)
 	 */
 	raw_spin_unlock(&this_rq->lock);
 
+	update_shares(this_cpu);
 	for_each_domain(this_cpu, sd) {
 		unsigned long interval;
 		int balance = 1;
--

Previous thread: [tg_shares_up rewrite v4 04/11] sched: fix load corruption from update_cfs_shares by Paul Turner on Monday, November 15, 2010 - 4:47 pm. (2 messages)

Next thread: [tg_shares_up rewrite v4 01/11] sched: rewrite tg_shares_up by Paul Turner on Monday, November 15, 2010 - 4:47 pm. (2 messages)