From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932120AbcEEJng (ORCPT ); Thu, 5 May 2016 05:43:36 -0400 Received: from terminus.zytor.com ([198.137.202.10]:44304 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932068AbcEEJne (ORCPT ); Thu, 5 May 2016 05:43:34 -0400 Date: Thu, 5 May 2016 02:42:55 -0700 From: tip-bot for Dietmar Eggemann Message-ID: Cc: dietmar.eggemann@arm.com, linux-kernel@vger.kernel.org, morten.rasmussen@arm.com, torvalds@linux-foundation.org, hpa@zytor.com, tglx@linutronix.de, peterz@infradead.org, efault@gmx.de, mingo@kernel.org Reply-To: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, hpa@zytor.com, morten.rasmussen@arm.com, tglx@linutronix.de, dietmar.eggemann@arm.com, efault@gmx.de, mingo@kernel.org, peterz@infradead.org In-Reply-To: <1461958364-675-3-git-send-email-dietmar.eggemann@arm.com> References: <1461958364-675-3-git-send-email-dietmar.eggemann@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/fair: Fix comment in calculate_imbalance() Git-Commit-ID: 885e542ce827f5f102fe9628d63c6430c8b7ab2c 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: 885e542ce827f5f102fe9628d63c6430c8b7ab2c Gitweb: http://git.kernel.org/tip/885e542ce827f5f102fe9628d63c6430c8b7ab2c Author: Dietmar Eggemann AuthorDate: Fri, 29 Apr 2016 20:32:39 +0100 Committer: Ingo Molnar CommitDate: Thu, 5 May 2016 09:41:10 +0200 sched/fair: Fix comment in calculate_imbalance() The comment in calculate_imbalance() was introduced in commit: 2dd73a4f09be ("[PATCH] sched: implement smpnice") which described the logic as it was then, but a later commit: b18855500fc4 ("sched/balancing: Fix 'local->avg_load > sds->avg_load' case in calculate_imbalance()") .. complicated this logic some more so that the comment does not match anymore. Update the comment to match the code. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1461958364-675-3-git-send-email-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar --- kernel/sched/fair.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 537d71e..51f7a4b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7000,9 +7000,10 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s } /* - * In the presence of smp nice balancing, certain scenarios can have - * max load less than avg load(as we skip the groups at or below - * its cpu_capacity, while calculating max_load..) + * Avg load of busiest sg can be less and avg load of local sg can + * be greater than avg load across all sgs of sd because avg load + * factors in sg capacity and sgs with smaller group_type are + * skipped when updating the busiest sg: */ if (busiest->avg_load <= sds->avg_load || local->avg_load >= sds->avg_load) {