Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754515AbdDKJMb (ORCPT ); Tue, 11 Apr 2017 05:12:31 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:39698 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754396AbdDKJM1 (ORCPT ); Tue, 11 Apr 2017 05:12:27 -0400 Date: Tue, 11 Apr 2017 11:12:19 +0200 From: Peter Zijlstra To: Vincent Guittot Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com, Morten.Rasmussen@arm.com, yuyang.du@intel.com, pjt@google.com, bsegall@google.com Subject: Re: [PATCH v2] sched/fair: update scale invariance of PELT Message-ID: <20170411091219.z26r7sa7hpz7gvix@hirez.programming.kicks-ass.net> References: <1491815909-13345-1-git-send-email-vincent.guittot@linaro.org> <20170410173802.orygigjbcpefqtdv@hirez.programming.kicks-ass.net> <20170411075221.GA30421@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170411075221.GA30421@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 859 Lines: 20 On Tue, Apr 11, 2017 at 09:52:21AM +0200, Vincent Guittot wrote: > > > + } else if (!weight) { > > > + if (sa->util_sum < (LOAD_AVG_MAX * 1000)) { > > > > But here I'm completely lost. WTF just happened ;-) > > > > Firstly, I think we want a comment on why we care about the !weight > > case. Why isn't !running sufficient? > > We track the time when the task is "really" idle but not the time that > the task spent to wait for running on the CPU. Running is used to > detect when the task is really running and how much idle time has been > lost while weight is used to detect when the task is back to sleep > state and when we have account the lost idle time. Huh? You're redefining what 'idle' means wrt. util_sum. util used to consider anything !running as idle. So this is the main trickery? I feel that deserves a comment of exceptional clarity.