Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162208AbbBDSmp (ORCPT ); Wed, 4 Feb 2015 13:42:45 -0500 Received: from foss-mx-na.foss.arm.com ([217.140.108.86]:41535 "EHLO foss-mx-na.foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161592AbbBDSbE (ORCPT ); Wed, 4 Feb 2015 13:31:04 -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 17/48] sched: Get rid of scaling usage by cpu_capacity_orig Date: Wed, 4 Feb 2015 18:30:54 +0000 Message-Id: <1423074685-6336-18-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: 1371 Lines: 42 From: Dietmar Eggemann Since now we have besides frequency invariant also cpu (uarch plus max system frequency) invariant cfs_rq::utilization_load_avg both, frequency and cpu scaling happens as part of the load tracking. So cfs_rq::utilization_load_avg does not have to be scaled by the original capacity of the cpu again. Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Dietmar Eggemann --- kernel/sched/fair.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5375ab1..a85c34b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4807,12 +4807,11 @@ static int select_idle_sibling(struct task_struct *p, int target) static int get_cpu_usage(int cpu) { unsigned long usage = cpu_rq(cpu)->cfs.utilization_load_avg; - unsigned long capacity = capacity_orig_of(cpu); if (usage >= SCHED_LOAD_SCALE) - return capacity; + return capacity_orig_of(cpu); - return (usage * capacity) >> SCHED_LOAD_SHIFT; + return usage; } /* -- 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/