Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752756AbbDBRWV (ORCPT ); Thu, 2 Apr 2015 13:22:21 -0400 Received: from g9t5009.houston.hp.com ([15.240.92.67]:38211 "EHLO g9t5009.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751469AbbDBRWT (ORCPT ); Thu, 2 Apr 2015 13:22:19 -0400 Message-ID: <1427995327.2556.54.camel@j-VirtualBox> Subject: Re: sched: Improve load balancing in the presence of idle CPUs From: Jason Low To: Morten Rasmussen Cc: Preeti U Murthy , "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" , jason.low2@hp.com Date: Thu, 02 Apr 2015 10:22:07 -0700 In-Reply-To: <20150402091704.GZ18994@e105550-lin.cambridge.arm.com> References: <1427741729.5694.24.camel@j-VirtualBox> <551A5CCE.70008@linux.vnet.ibm.com> <1427828056.2492.24.camel@j-VirtualBox> <551B9514.80701@linux.vnet.ibm.com> <20150401170418.GX18994@e105550-lin.cambridge.arm.com> <1427954347.2556.43.camel@j-VirtualBox> <20150402091704.GZ18994@e105550-lin.cambridge.arm.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: 1221 Lines: 28 On Thu, 2015-04-02 at 10:17 +0100, Morten Rasmussen wrote: > On Thu, Apr 02, 2015 at 06:59:07AM +0100, Jason Low wrote: > > Also, below is an example patch. > > > > (Without the conversion to idle_cpu(), the check for rq->idle_balance > > would not be accurate anymore) > I think this should reduce the latency Preeti is seeing and avoid > unnecessary wake-ups, however, it may not be quite as aggressive in > spreading tasks quickly. It will stop the chain-of-kicks as soon as the > balancer cpu has pulled only one task. The source cpu may still be > having two tasks and other cpus may still have more than two tasks > running. Yeah, good point. I'll wait and see if Preeti finds this to improve scheduling behavior. If this only helps a little though, we can also try to make it more aggressive in spreading tasks. > Depending on how bad it is, we could consider kicking another cpu if the > imbalance is still significant after the balancer cpu has pulled a task. -- 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/