Messages in this thread Patch in this message | | | From | Morten Rasmussen <> | Subject | [RFC][PATCH 3/9] sched: Make select_idle_sibling() skip cpu with a cpu_power of 1 | Date | Tue, 9 Jul 2013 16:55:32 +0100 |
| |
select_idle_sibling() must disregard cpus with cpu_power=1 to avoid using cpus disabled by the power scheduler.
This is a quick fix. The algorithm should be updated to handle cpu_power=1 properly.
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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 01f1f26..f637ea5 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3287,13 +3287,14 @@ static int select_idle_sibling(struct task_struct *p, int target) struct sched_group *sg; int i = task_cpu(p); - if (idle_cpu(target)) + if (idle_cpu(target) && power_cpu_balance(target)) return target; /* * If the prevous cpu is cache affine and idle, don't be stupid. */ - if (i != target && cpus_share_cache(i, target) && idle_cpu(i)) + if (i != target && cpus_share_cache(i, target) && idle_cpu(i) && + power_cpu_balance(i)) return i; /* @@ -3308,7 +3309,8 @@ static int select_idle_sibling(struct task_struct *p, int target) goto next; for_each_cpu(i, sched_group_cpus(sg)) { - if (i == target || !idle_cpu(i)) + if (i == target || !idle_cpu(i) || + !power_cpu_balance(i)) goto next; } -- 1.7.9.5
| |