Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752505AbdI2P0Q (ORCPT ); Fri, 29 Sep 2017 11:26:16 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:45216 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752223AbdI2P0P (ORCPT ); Fri, 29 Sep 2017 11:26:15 -0400 Date: Fri, 29 Sep 2017 16:26:10 +0100 From: Morten Rasmussen To: Peter Zijlstra Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, tj@kernel.org, josef@toxicpanda.com, torvalds@linux-foundation.org, vincent.guittot@linaro.org, efault@gmx.de, pjt@google.com, clm@fb.com, dietmar.eggemann@arm.com, bsegall@google.com, yuyang.du@intel.com Subject: Re: [PATCH -v2 04/18] sched/fair: Remove se->load.weight from se->avg.load_sum Message-ID: <20170929152607.GC16286@e105550-lin.cambridge.arm.com> References: <20170901132059.342024223@infradead.org> <20170901132748.190668510@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170901132748.190668510@infradead.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 802 Lines: 25 On Fri, Sep 01, 2017 at 03:21:03PM +0200, Peter Zijlstra wrote: > +/* > + * sched_entity: > + * > + * load_sum := runnable_sum > + * load_avg = se_weight(se) * runnable_avg > + * > + * cfq_rs: I think this should be "cfs_rq" instead. > + * > + * load_sum = \Sum se_weight(se) * se->avg.load_sum > + * load_avg = \Sum se->avg.load_avg > + */ I find it a bit confusing that load_sum and load_avg have different definitions, but I guess I will discover why dropping weight from se->avg.load_sum helps a bit later. We can't do the same for cfs_rq as it is a \Sum of sums where we add/remove contributions when tasks migrate. Have we defined the relation between runnable_sum and runnable_avg in a comment somewhere already? Otherwise it might be helpful to add. It is in the code of course :-)