From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933432AbcIELzz (ORCPT ); Mon, 5 Sep 2016 07:55:55 -0400 Received: from terminus.zytor.com ([198.137.202.10]:36432 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932707AbcIELzv (ORCPT ); Mon, 5 Sep 2016 07:55:51 -0400 Date: Mon, 5 Sep 2016 04:55:17 -0700 From: tip-bot for Dietmar Eggemann Message-ID: Cc: dietmar.eggemann@arm.com, peterz@infradead.org, torvalds@linux-foundation.org, morten.rasmussen@arm.com, linux-kernel@vger.kernel.org, vincent.guittot@linaro.org, tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, yuyang.du@intel.com Reply-To: tglx@linutronix.de, linux-kernel@vger.kernel.org, vincent.guittot@linaro.org, torvalds@linux-foundation.org, morten.rasmussen@arm.com, dietmar.eggemann@arm.com, peterz@infradead.org, yuyang.du@intel.com, mingo@kernel.org, hpa@zytor.com In-Reply-To: <1470824847-5316-1-git-send-email-dietmar.eggemann@arm.com> References: <1470824847-5316-1-git-send-email-dietmar.eggemann@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/fair: Fix load_above_capacity fixed point arithmetic width Git-Commit-ID: 2665621506e178a1f62e59200403c359c463ea5e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 2665621506e178a1f62e59200403c359c463ea5e Gitweb: http://git.kernel.org/tip/2665621506e178a1f62e59200403c359c463ea5e Author: Dietmar Eggemann AuthorDate: Wed, 10 Aug 2016 11:27:27 +0100 Committer: Ingo Molnar CommitDate: Mon, 5 Sep 2016 13:29:44 +0200 sched/fair: Fix load_above_capacity fixed point arithmetic width Since commit: 2159197d6677 ("sched/core: Enable increased load resolution on 64-bit kernels") we now have two different fixed point units for load. load_above_capacity has to have 10 bits fixed point unit like PELT, whereas NICE_0_LOAD has 20 bit fixed point unit on 64-bit kernels. Fix this by scaling down NICE_0_LOAD when multiplying load_above_capacity with it. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Vincent Guittot Acked-by: Morten Rasmussen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yuyang Du Link: http://lkml.kernel.org/r/1470824847-5316-1-git-send-email-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 9a18aae..6011bfe 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7193,7 +7193,7 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s load_above_capacity = busiest->sum_nr_running * SCHED_CAPACITY_SCALE; if (load_above_capacity > busiest->group_capacity) { load_above_capacity -= busiest->group_capacity; - load_above_capacity *= NICE_0_LOAD; + load_above_capacity *= scale_load_down(NICE_0_LOAD); load_above_capacity /= busiest->group_capacity; } else load_above_capacity = ~0UL;