Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752093AbdI2LjE (ORCPT ); Fri, 29 Sep 2017 07:39:04 -0400 Received: from merlin.infradead.org ([205.233.59.134]:41674 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751643AbdI2LjD (ORCPT ); Fri, 29 Sep 2017 07:39:03 -0400 Date: Fri, 29 Sep 2017 13:38:53 +0200 From: Peter Zijlstra To: Morten Rasmussen 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: <20170929113853.7voni73crg6hfvjx@hirez.programming.kicks-ass.net> References: <20170901132059.342024223@infradead.org> <20170901132748.141477819@infradead.org> <20170929090434.GB962@e105550-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170929090434.GB962@e105550-lin.cambridge.arm.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 613 Lines: 15 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.