Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161796AbbBDSdh (ORCPT ); Wed, 4 Feb 2015 13:33:37 -0500 Received: from foss-mx-na.foss.arm.com ([217.140.108.86]:41741 "EHLO foss-mx-na.foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967054AbbBDSby (ORCPT ); Wed, 4 Feb 2015 13:31:54 -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 44/48] sched: Tipping point from energy-aware to conventional load balancing Date: Wed, 4 Feb 2015 18:31:21 +0000 Message-Id: <1423074685-6336-45-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: 1430 Lines: 40 From: Dietmar Eggemann Energy-aware load balancing bases on cpu usage so the upper bound of its operational range is a fully utilized cpu. Above this tipping point it makes more sense to use weighted_cpuload to preserve smp_nice. This patch implements the tipping point detection in update_sg_lb_stats as if one cpu is over-utilized the current energy-aware load balance operation will fall back into the conventional weighted load based one. cc: Ingo Molnar cc: Peter Zijlstra Signed-off-by: Dietmar Eggemann --- kernel/sched/fair.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6b79603..4849bad 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6723,6 +6723,10 @@ static inline void update_sg_lb_stats(struct lb_env *env, sgs->sum_weighted_load += weighted_cpuload(i); if (idle_cpu(i)) sgs->idle_cpus++; + + /* If cpu is over-utilized, bail out of ea */ + if (env->use_ea && cpu_overutilized(i, env->sd)) + env->use_ea = false; } /* Adjust by relative CPU capacity of the group */ -- 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/