From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753194AbbC0HS3 (ORCPT ); Fri, 27 Mar 2015 03:18:29 -0400 Received: from mga09.intel.com ([134.134.136.24]:17380 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753124AbbC0HS3 (ORCPT ); Fri, 27 Mar 2015 03:18:29 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,477,1422950400"; d="scan'208";a="698671038" Date: Fri, 27 Mar 2015 15:00:08 +0800 From: Wanpeng Li To: Srikar Dronamraju Cc: Jason Low , Wanpeng Li , Preeti U Murthy , peterz@infradead.org, mingo@kernel.org, riel@redhat.com, daniel.lezcano@linaro.org, vincent.guittot@linaro.org, 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 Subject: Re: [PATCH V2] sched: Improve load balancing in the presence of idle CPUs Message-ID: <20150327070008.GA5496@kernel> Reply-To: Wanpeng Li References: <20150326130014.21532.17158.stgit@preeti.in.ibm.com> <20150327021201.GA4491@kernel> <1427432841.2788.10.camel@j-VirtualBox> <20150327053907.GB6895@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150327053907.GB6895@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Srikar, On Fri, Mar 27, 2015 at 11:09:07AM +0530, Srikar Dronamraju wrote: > >Yes, the need_resched() in nohz_idle_balance() would exit the >nohz_idle_balance if it has something to run. However I wonder if we >should move the need_resched check out of the for loop. i.e the >need_resched check should probably be there with the idle check. > >With the current code when the ilb cpus are not free: >- We would be updating the nohz.next_balance even through we havent done > any load balance. >- We might iterate thro the nohz.idle_cpus_mask()s to find balance_cpus. Good idea, the nohz load balance will be delay since nohz.next_balance is updated inapposite when current ILB just be busy. I will send a patch to fix it. ;) Regards, Wanpeng Li