Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752440AbdI2NAp (ORCPT ); Fri, 29 Sep 2017 09:00:45 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:43272 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752123AbdI2NAm (ORCPT ); Fri, 29 Sep 2017 09:00:42 -0400 Date: Fri, 29 Sep 2017 14:00:34 +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 03/18] sched/fair: Cure calc_cfs_shares() vs reweight_entity() Message-ID: <20170929130033.GA16286@e105550-lin.cambridge.arm.com> References: <20170901132059.342024223@infradead.org> <20170901132748.141477819@infradead.org> <20170929090434.GB962@e105550-lin.cambridge.arm.com> <20170929113853.7voni73crg6hfvjx@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170929113853.7voni73crg6hfvjx@hirez.programming.kicks-ass.net> 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: 751 Lines: 18 On Fri, Sep 29, 2017 at 01:38:53PM +0200, Peter Zijlstra wrote: > On Fri, Sep 29, 2017 at 10:04:34AM +0100, Morten Rasmussen wrote: > > > > - load = scale_load_down(cfs_rq->load.weight); > > > + load = max(scale_load_down(cfs_rq->load.weight), cfs_rq->avg.load_avg); > > > > We use cfs_rq->tg_load_avg_contrib (the filtered version of > > cfs_rq->avg.load_avg) instead of cfs_rq->avg.load_avg further down, so I > > think we should here too for consistency. > > > > + load = max(scale_load_down(cfs_rq->load.weight), > > + cfs_rq->tg_load_avg_contrib); > > > > No; we must use tg_load_avg_contrib because that is what's inclded in > tg_weight, but we want to add the most up-to-date value back in. Agreed. Looking at it again it make sense.