Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753373AbbDBCNd (ORCPT ); Wed, 1 Apr 2015 22:13:33 -0400 Received: from g1t5424.austin.hp.com ([15.216.225.54]:43800 "EHLO g1t5424.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752400AbbDBCNa (ORCPT ); Wed, 1 Apr 2015 22:13:30 -0400 Message-ID: <1427940712.2556.14.camel@j-VirtualBox> Subject: Re: sched: Improve load balancing in the presence of idle CPUs From: Jason Low To: Preeti U Murthy Cc: peterz@infradead.org, mingo@kernel.org, Daniel Lezcano , riel@redhat.com, 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: Wed, 01 Apr 2015 19:11:52 -0700 In-Reply-To: <551A5CCE.70008@linux.vnet.ibm.com> References: <1427741729.5694.24.camel@j-VirtualBox> <551A5CCE.70008@linux.vnet.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 Content-Length: 1009 Lines: 26 On Tue, 2015-03-31 at 14:07 +0530, Preeti U Murthy wrote: > On 03/31/2015 12:25 AM, Jason Low wrote: > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index fdae26e..ba8ec1a 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -7644,7 +7644,7 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle) > > * balancing owner will pick it up. > > */ > > if (need_resched()) > > - break; > > + goto end; > > Why is this hunk needed? In terms of the change in the need_resched() case, if the current CPU doesn't complete iterating all of the CPUs, then this will make it not update nohz.next_balance. This is so we can continue the balancing with the next balancing owner without too much delay. -- 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/