[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1373385338-12983-5-git-send-email-morten.rasmussen@arm.com>
Date: Tue, 9 Jul 2013 16:55:33 +0100
From: Morten Rasmussen <morten.rasmussen@....com>
To: mingo@...nel.org, peterz@...radead.org
Cc: arjan@...ux.intel.com, vincent.guittot@...aro.org,
preeti@...ux.vnet.ibm.com, alex.shi@...el.com, efault@....de,
pjt@...gle.com, len.brown@...el.com, corbet@....net,
akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
tglx@...utronix.de, catalin.marinas@....com,
linux-kernel@...r.kernel.org, linaro-kernel@...ts.linaro.org,
morten.rasmussen@....com
Subject: [RFC][PATCH 4/9] sched: Make periodic load-balance disregard cpus with a cpu_power of 1
Some of the load_balance() helper functions will put tasks on cpus with
cpu_power=1 when they are completely idle. This patch changes this behaviour.
The patch is a quick fix. The load_balance() helper functions should be
revisited to implement proper handling of cpus with cpu_power=1.
Signed-off-by: Morten Rasmussen <morten.rasmussen@....com>
CC: Ingo Molnar <mingo@...nel.org>
CC: Peter Zijlstra <peterz@...radead.org>
CC: Catalin Marinas <catalin.marinas@....com>
---
kernel/sched/fair.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f637ea5..4610463 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3952,6 +3952,13 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
}
/*
+ * Vacate cpus disabled by the power scheduler even if the cache is
+ * hot
+ */
+ if (!power_cpu_balance(env->src_cpu))
+ return 1;
+
+ /*
* Aggressive migration if:
* 1) task is cache cold, or
* 2) too many balance attempts have failed.
@@ -4500,6 +4507,11 @@ static inline void update_sg_lb_stats(struct lb_env *env,
update_group_power(env->sd, env->dst_cpu);
} else if (time_after_eq(jiffies, group->sgp->next_update))
update_group_power(env->sd, env->dst_cpu);
+
+ if (!power_cpu_balance(env->dst_cpu)) {
+ *balance = 0;
+ return;
+ }
}
/* Adjust by relative CPU power of the group */
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists