Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753461AbbGUIfT (ORCPT ); Tue, 21 Jul 2015 04:35:19 -0400 Received: from mga03.intel.com ([134.134.136.65]:23446 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752793AbbGUIfQ (ORCPT ); Tue, 21 Jul 2015 04:35:16 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,514,1432623600"; d="scan'208";a="751345122" Date: Tue, 21 Jul 2015 08:44:01 +0800 From: Yuyang Du To: Boqun Feng Cc: mingo@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, pjt@google.com, bsegall@google.com, morten.rasmussen@arm.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, umgwanakikbuti@gmail.com, len.brown@intel.com, rafael.j.wysocki@intel.com, arjan@linux.intel.com, fengguang.wu@intel.com Subject: Re: [PATCH v10 6/7] sched: Provide runnable_load_avg back to cfs_rq Message-ID: <20150721004400.GA28512@intel.com> References: <1436918682-4971-1-git-send-email-yuyang.du@intel.com> <1436918682-4971-7-git-send-email-yuyang.du@intel.com> <20150721010346.GA2882@fixme-laptop.cn.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150721010346.GA2882@fixme-laptop.cn.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 Content-Length: 1726 Lines: 39 On Tue, Jul 21, 2015 at 09:08:07AM +0800, Boqun Feng wrote: > Hi Yuyang, > > On Wed, Jul 15, 2015 at 08:04:41AM +0800, Yuyang Du wrote: > > The cfs_rq's load_avg is composed of runnable_load_avg and blocked_load_avg. > > Before this series, sometimes the runnable_load_avg is used, and sometimes > > the load_avg is used. Completely replacing all uses of runnable_load_avg > > with load_avg may be too big a leap, i.e., the blocked_load_avg is concerned > > to result in overrated load. Therefore, we get runnable_load_avg back. > > > > The new cfs_rq's runnable_load_avg is improved to be updated with all of the > > runnable sched_eneities at the same time, so the one sched_entity updated and > > the others stale problem is solved. > > > > How about tracking cfs_rq's blocked_load_avg instead of > runnable_load_avg, because, AFAICS: > > cfs_rq->runnable_load_avg = se->avg.load_avg - cfs_rq->blocked_load_avg. No, cfs_rq->runnable_load_avg = cfs_rq->avg.load_avg - cfs_rq->blocked_load_avg, without rounding errors and the like. > se is the corresponding sched_entity of cfs_rq. And when we need the > runnable_load_avg, we just calculate by the expression above. > > This can be thought as a lazy way to update runnable_load_avg, and we > don't need to modify __update_load_avg any more. Not lazy at all, but adding (as of now) useless blocked_load_avg and an extra subtraction. Or did you forget blocked_load_avg also needs to be updated/decayed as time elapses? -- 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/