Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753067AbbGBI5g (ORCPT ); Thu, 2 Jul 2015 04:57:36 -0400 Received: from mga03.intel.com ([134.134.136.65]:30366 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753340AbbGBI53 (ORCPT ); Thu, 2 Jul 2015 04:57:29 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,391,1432623600"; d="scan'208";a="739118566" Date: Thu, 2 Jul 2015 09:05:39 +0800 From: Yuyang Du To: Mike Galbraith Cc: Peter Zijlstra , Rabin Vincent , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , Paul Turner , Ben Segall , Morten Rasmussen Subject: Re: [PATCH?] Livelock in pick_next_task_fair() / idle_balance() Message-ID: <20150702010539.GB5197@intel.com> References: <20150630143057.GA31689@axis.com> <1435728995.9397.7.camel@gmail.com> <20150701145551.GA15690@axis.com> <20150701204404.GH25159@twins.programming.kicks-ass.net> <20150701232511.GA5197@intel.com> <1435824347.5351.18.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435824347.5351.18.camel@gmail.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 Content-Length: 1305 Lines: 31 Hi Mike, On Thu, Jul 02, 2015 at 10:05:47AM +0200, Mike Galbraith wrote: > On Thu, 2015-07-02 at 07:25 +0800, Yuyang Du wrote: > > > That being said, it is also obvious to prevent the livelock from happening: > > idle pulling until the source rq's nr_running is 1, becuase otherwise we > > just avoid idleness by making another idleness. > > Yeah, but that's just the symptom, not the disease. Better for the idle > balance symptom may actually be to only pull one when idle balancing. > After all, the immediate goal is to find something better to do than > idle, not to achieve continual perfect (is the enemy of good) balance. > Symptom? :) You mean "pull one and stop, can't be greedy"? Right, but still need to assure you don't make another idle CPU (meaning until nr_running == 1), which is the cure to disease. I am ok with at most "pull one", but probably we stick to the load_balance() by pulling an fair amount, assuming load_balance() magically computes the right imbalance, otherwise you may have to do multiple "pull one"s. Thanks, Yuyang -- 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/