Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161747AbbBDSbm (ORCPT ); Wed, 4 Feb 2015 13:31:42 -0500 Received: from foss-mx-na.foss.arm.com ([217.140.108.86]:41662 "EHLO foss-mx-na.foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161694AbbBDSbi (ORCPT ); Wed, 4 Feb 2015 13:31:38 -0500 From: Morten Rasmussen To: peterz@infradead.org, mingo@redhat.com Cc: vincent.guittot@linaro.org, dietmar.eggemann@arm.com, yuyang.du@intel.com, preeti@linux.vnet.ibm.com, mturquette@linaro.org, nico@linaro.org, rjw@rjwysocki.net, juri.lelli@arm.com, linux-kernel@vger.kernel.org Subject: [RFCv3 PATCH 38/48] sched: Infrastructure to query if load balancing is energy-aware Date: Wed, 4 Feb 2015 18:31:15 +0000 Message-Id: <1423074685-6336-39-git-send-email-morten.rasmussen@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423074685-6336-1-git-send-email-morten.rasmussen@arm.com> References: <1423074685-6336-1-git-send-email-morten.rasmussen@arm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1431 Lines: 46 From: Dietmar Eggemann 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 cc: Peter Zijlstra Signed-off-by: Dietmar Eggemann --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/