lkml.org 
[lkml]   [2013]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC][PATCH 5/9] sched: Make idle_balance() skip cpus with a cpu_power of 1
Date
idle_balance() should disregard cpus disabled by the power scheduler.

This is a quick fix. idle_balance() should be revisit to implement proper
handling of cpus with cpu_power=1.

Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
CC: Ingo Molnar <mingo@kernel.org>
CC: Peter Zijlstra <peterz@infradead.org>
CC: Catalin Marinas <catalin.marinas@arm.com>
---
kernel/sched/fair.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 4610463..a59617b 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5261,6 +5261,10 @@ void idle_balance(int this_cpu, struct rq *this_rq)
if (this_rq->avg_idle < sysctl_sched_migration_cost)
return;

+ /* Don't pull tasks if disable by power scheduler */
+ if (!power_cpu_balance(this_cpu))
+ return;
+
/*
* Drop the rq->lock, but keep IRQ/preempt disabled.
*/
--
1.7.9.5



\
 
 \ /
  Last update: 2013-07-10 23:39    [W:0.224 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site