diff options
author | Dietmar Eggemann <dietmar.eggemann@arm.com> | 2015-01-28 16:57:06 +0000 |
---|---|---|
committer | Robin Randhawa <robin.randhawa@arm.com> | 2015-04-09 12:26:14 +0100 |
commit | c40def01b8951335927c4d7b7f4c4ff744cc36e9 (patch) | |
tree | 140ac88f33e1b76927f43a836c3eec01063daae9 | |
parent | 15bd117fcd2010c62a5865215e38d36036dc1ac5 (diff) |
sched: Infrastructure to query if load balancing is energy-aware
Energy-aware load balancing should only happen if the ENERGY_AWARE feature
is turned on and the sched domain on which the load balancing is performed
on contains energy data.
There is also a need during a load balance action to be able to query if we
should continue to load balance energy-aware or if we reached the tipping
point which forces us to fall back to the conventional load balancing
functionality.
cc: Ingo Molnar <mingo@redhat.com>
cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
-rw-r--r-- | kernel/sched/fair.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index a76777fa6079..f49a4cb35e57 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5510,6 +5510,8 @@ struct lb_env { unsigned int loop; unsigned int loop_break; unsigned int loop_max; + + bool use_ea; }; /* @@ -6828,6 +6830,7 @@ static int load_balance(int this_cpu, struct rq *this_rq, .idle = idle, .loop_break = sched_nr_migrate_break, .cpus = cpus, + .use_ea = (energy_aware() && sd->groups->sge) ? true : false, }; /* |