Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757517AbbGUBIW (ORCPT ); Mon, 20 Jul 2015 21:08:22 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:33603 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757128AbbGUBIV (ORCPT ); Mon, 20 Jul 2015 21:08:21 -0400 Date: Tue, 21 Jul 2015 09:08:07 +0800 From: Boqun Feng To: Yuyang Du 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: <20150721010346.GA2882@fixme-laptop.cn.ibm.com> References: <1436918682-4971-1-git-send-email-yuyang.du@intel.com> <1436918682-4971-7-git-send-email-yuyang.du@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1436918682-4971-7-git-send-email-yuyang.du@intel.com> User-Agent: Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1337 Lines: 32 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. 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. Regards, Boqun -- 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/