public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] sched: let task migration destination cpu do active balance
@ 2014-04-16 11:34 Alex Shi
  2014-04-16 12:13 ` Peter Zijlstra
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Shi @ 2014-04-16 11:34 UTC (permalink / raw)
  To: mingo, peterz, morten.rasmussen, vincent.guittot, daniel.lezcano,
	efault, chris.redpath
  Cc: wangyun, linux-kernel

Chris Redpath found an issue on active balance: 
We let the task source cpu, the busiest cpu, do the active balance,
while the destination cpu maybe idle. thus we take the busiest cpu
time, but left the idlest cpu wait. That is not good for performance.

This patch let the destination cpu do active balance. It will give tasks
more running time.

Signed-off-by: Alex Shi <alex.shi@linaro.org>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 9b4c4f3..cccee76 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6308,7 +6308,7 @@ more_balance:
 			raw_spin_unlock_irqrestore(&busiest->lock, flags);
 
 			if (active_balance) {
-				stop_one_cpu_nowait(cpu_of(busiest),
+				stop_one_cpu_nowait(busiest->push_cpu,
 					active_load_balance_cpu_stop, busiest,
 					&busiest->active_balance_work);
 			}
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-23 15:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-16 11:34 [RFC PATCH] sched: let task migration destination cpu do active balance Alex Shi
2014-04-16 12:13 ` Peter Zijlstra
2014-04-17  5:42   ` Alex Shi
2014-04-23 15:45     ` Chris Redpath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox