diff options
author | Vincent Guittot <vincent.guittot@linaro.org> | 2013-05-30 18:16:37 +0200 |
---|---|---|
committer | Vincent Guittot <vincent.guittot@linaro.org> | 2013-10-17 22:11:00 +0200 |
commit | 4fdf064e24854a1937a06b3b46e83b485f422f32 (patch) | |
tree | 177ece8bbd4c2e34af9ba7391509bbbf087a38e0 | |
parent | 6fc4cbb8fdc7401d7f0774245d856c02f77d6380 (diff) |
sched: init this_load to max in find_idlest_group
Init this_load to max value instead of 0 in find_idlest_group.
If the local group is skipped because it doesn't have allowed CPUs, this_load
stays to 0, no idlest group will be returned and the selected CPU will be a
not allowed one (which will be replaced in select_fallback_rq by a random
one). With a default value set to max, we will use the idlest group even if we
skip the local_group.
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
-rw-r--r-- | kernel/sched/fair.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index f9b03c1bce1e..2d9f782a3498 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3532,7 +3532,7 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p, int this_cpu, int sd_flag) { struct sched_group *idlest = NULL, *group = sd->groups; - unsigned long min_load = ULONG_MAX, this_load = 0; + unsigned long min_load = ULONG_MAX, this_load = ULONG_MAX; int load_idx = sd->forkexec_idx; int imbalance = 100 + (sd->imbalance_pct-100)/2; |