Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967092AbbBDSb6 (ORCPT ); Wed, 4 Feb 2015 13:31:58 -0500 Received: from foss-mx-na.foss.arm.com ([217.140.108.86]:41747 "EHLO foss-mx-na.foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967073AbbBDSbz (ORCPT ); Wed, 4 Feb 2015 13:31:55 -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 45/48] sched: Skip cpu as lb src which has one task and capacity gte the dst cpu Date: Wed, 4 Feb 2015 18:31:22 +0000 Message-Id: <1423074685-6336-46-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: 1187 Lines: 37 From: Dietmar Eggemann Skip cpu as a potential src (costliest) in case it has only one task running and its original capacity is greater than or equal to the original capacity of the dst cpu. 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 4849bad..b6e2e92 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7251,6 +7251,10 @@ static struct rq *find_busiest_queue(struct lb_env *env, }; unsigned long energy = sched_group_energy(&eenv); + if (rq->nr_running == 1 && capacity_orig_of(i) >= + capacity_orig_of(env->dst_cpu)) + continue; + /* * We're looking for the minimal cpu efficiency * min(u_i / e_i), crosswise multiplication leads to -- 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/