From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754329AbbGGGuH (ORCPT ); Tue, 7 Jul 2015 02:50:07 -0400 Received: from terminus.zytor.com ([198.137.202.10]:57602 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754121AbbGGGt7 (ORCPT ); Tue, 7 Jul 2015 02:49:59 -0400 Date: Mon, 6 Jul 2015 23:49:23 -0700 From: tip-bot for Srikar Dronamraju Message-ID: Cc: torvalds@linux-foundation.org, hpa@zytor.com, linux-kernel@vger.kernel.org, srikar@linux.vnet.ibm.com, tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, mgorman@suse.de, riel@redhat.com Reply-To: hpa@zytor.com, torvalds@linux-foundation.org, tglx@linutronix.de, peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, srikar@linux.vnet.ibm.com, riel@redhat.com, mgorman@suse.de In-Reply-To: <1434455762-30857-3-git-send-email-srikar@linux.vnet.ibm.com> References: <1434455762-30857-3-git-send-email-srikar@linux.vnet.ibm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/numa: Consider 'imbalance_pct' when comparing loads in numa_has_capacity() Git-Commit-ID: 44dcb04f0ea8eaac3b9c9d3172416efc5a950214 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: 44dcb04f0ea8eaac3b9c9d3172416efc5a950214 Gitweb: http://git.kernel.org/tip/44dcb04f0ea8eaac3b9c9d3172416efc5a950214 Author: Srikar Dronamraju AuthorDate: Tue, 16 Jun 2015 17:26:00 +0530 Committer: Ingo Molnar CommitDate: Tue, 7 Jul 2015 08:46:10 +0200 sched/numa: Consider 'imbalance_pct' when comparing loads in numa_has_capacity() This is consistent with all other load balancing instances where we absorb unfairness upto env->imbalance_pct. Absorbing unfairness upto env->imbalance_pct allows to pull and retain task to their preferred nodes. Signed-off-by: Srikar Dronamraju Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rik van Riel Cc: Linus Torvalds Cc: Mel Gorman Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1434455762-30857-3-git-send-email-srikar@linux.vnet.ibm.com Signed-off-by: Ingo Molnar --- kernel/sched/fair.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 43ee84f..a53a610 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1415,8 +1415,9 @@ static bool numa_has_capacity(struct task_numa_env *env) * --------------------- vs --------------------- * src->compute_capacity dst->compute_capacity */ - if (src->load * dst->compute_capacity > - dst->load * src->compute_capacity) + if (src->load * dst->compute_capacity * env->imbalance_pct > + + dst->load * src->compute_capacity * 100) return true; return false;