From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752391AbbCZRDc (ORCPT ); Thu, 26 Mar 2015 13:03:32 -0400 Received: from g2t2354.austin.hp.com ([15.217.128.53]:36297 "EHLO g2t2354.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751756AbbCZRD3 (ORCPT ); Thu, 26 Mar 2015 13:03:29 -0400 Message-ID: <1427389400.2777.3.camel@j-VirtualBox> Subject: Re: [PATCH V2] sched: Improve load balancing in the presence of idle CPUs From: Jason Low To: Preeti U Murthy Cc: peterz@infradead.org, mingo@kernel.org, riel@redhat.com, daniel.lezcano@linaro.org, vincent.guittot@linaro.org, srikar@linux.vnet.ibm.com, pjt@google.com, benh@kernel.crashing.org, efault@gmx.de, linux-kernel@vger.kernel.org, iamjoonsoo.kim@lge.com, svaidy@linux.vnet.ibm.com, tim.c.chen@linux.intel.com, morten.rasmussen@arm.com, jason.low2@hp.com Date: Thu, 26 Mar 2015 10:03:20 -0700 In-Reply-To: <20150326130014.21532.17158.stgit@preeti.in.ibm.com> References: <20150326130014.21532.17158.stgit@preeti.in.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-03-26 at 18:32 +0530, Preeti U Murthy wrote: > kernel/sched/fair.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index bcfe320..8b6d0d5 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -7660,14 +7660,16 @@ static void run_rebalance_domains(struct softirq_action *h) > enum cpu_idle_type idle = this_rq->idle_balance ? > CPU_IDLE : CPU_NOT_IDLE; > > - rebalance_domains(this_rq, idle); > - > /* > * If this cpu has a pending nohz_balance_kick, then do the > * balancing on behalf of the other idle cpus whose ticks are > - * stopped. > + * stopped. Do nohz_idle_balance *before* rebalance_domains to > + * give the idle cpus a chance to load balance. Else we may > + * load balance only within the local sched_domain hierarchy > + * and abort nohz_idle_balance altogether if we pull some load. > */ > nohz_idle_balance(this_rq, idle); > + rebalance_domains(this_rq, idle); Reviewed-by: Jason Low