lkml.org 
[lkml]   [2015]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFCv3 PATCH 38/48] sched: Infrastructure to query if load balancing is energy-aware
Date
From: Dietmar Eggemann <dietmar.eggemann@arm.com>

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>
---
kernel/sched/fair.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 0e95eb5..45c784f 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5836,6 +5836,7 @@ struct lb_env {

enum fbq_type fbq_type;
struct list_head tasks;
+ bool use_ea;
};

/*
@@ -7348,6 +7349,7 @@ static int load_balance(int this_cpu, struct rq *this_rq,
.cpus = cpus,
.fbq_type = all,
.tasks = LIST_HEAD_INIT(env.tasks),
+ .use_ea = (energy_aware() && sd->groups->sge) ? true : false,
};

/*
--
1.9.1


\
 
 \ /
  Last update: 2015-02-04 19:41    [W:0.578 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site