Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1287369imu; Wed, 28 Nov 2018 07:24:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/VbsPr+Cc/Axc96sr4ysT6fbzFU6LUPXMhx7XRuTeo2BaMy8BDiu2ITNKHsc2h7CeUJVx5R X-Received: by 2002:a63:ed42:: with SMTP id m2mr33582956pgk.147.1543418668608; Wed, 28 Nov 2018 07:24:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543418668; cv=none; d=google.com; s=arc-20160816; b=ISJ5O01swg22fy9bK/1MD8SlzVQjtW0tBQ14m4egKqzsqrwdOIMTvmJ6aPIt+zMaE4 o2OxAdFFOzhvfpmWEToh+Qydcgg94jgL2/um6ujVHKEoSmltTA+2NZGNy/yBrVl7bvJs K8RSaLaOAdYOmKiuNVqVUGoYHGdhjubp+rCNLFcMauXTo1nWtDM0uIQMu+cO1XWYc7+F EqxKTSpLLNgYq4HXBL8ontCMYYzKP6FvEmH9AjMJMbzDSyFkNAf2lYwGfi1QYYAQWKWA u/Q0++rZdd6fCS35fc46VerTcmjN2t7/sBZE4O30wSv2Vn2ubzkjU36RnDzCsym3IVQN oOJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Ee2SU6Bjiwu7DTSkvBC2XWt4S72ig2VcBd0hu+pvJFY=; b=ZmACwcCtx2arlz97IJO5SlQeHl1o7ARIR6QnpTRh1KDGaDA+uJtPX80GUCFNGcCcbE mLC3RdLFoJPi2yPkoO+uPLtLZNWLmxzY+TjUQKLgO933pEWc6IE93SrrTkr+sm8fTvOc orx+8lSBkHTr7EjM7i/aRCCLsPdM93lzVw/h10fkOLWM3szmNFocLQfmOFgmtql596Fw vVxPz2oxRZs5FWYdyin2tE7PiN+GUd1vnd/XzDte2HIWy1B0eL0WzoZ2IyM9MnNKcgmK 4Jev88nyEvpFHsRRFppjrPQR08UKRhrrdard5K+zYR4K22kNnxA2qsAWdy3gtCFhLA4T thHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b14si8464773plk.333.2018.11.28.07.24.05; Wed, 28 Nov 2018 07:24:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728614AbeK2CXj (ORCPT + 99 others); Wed, 28 Nov 2018 21:23:39 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:43380 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728163AbeK2CXj (ORCPT ); Wed, 28 Nov 2018 21:23:39 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A57942379; Wed, 28 Nov 2018 07:21:38 -0800 (PST) Received: from e110439-lin (e110439-lin.cambridge.arm.com [10.1.194.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6D9C63F5AF; Wed, 28 Nov 2018 07:21:36 -0800 (PST) Date: Wed, 28 Nov 2018 15:21:33 +0000 From: Patrick Bellasi To: Vincent Guittot Cc: Peter Zijlstra , Ingo Molnar , linux-kernel , "Rafael J. Wysocki" , Dietmar Eggemann , Morten Rasmussen , Paul Turner , Ben Segall , Thara Gopinath , pkondeti@codeaurora.org, Quentin Perret , Srinivas Pandruvada Subject: Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT Message-ID: <20181128152133.GD23094@e110439-lin> References: <1542711308-25256-1-git-send-email-vincent.guittot@linaro.org> <1542711308-25256-3-git-send-email-vincent.guittot@linaro.org> <20181128100241.GA2131@hirez.programming.kicks-ass.net> <20181128115336.GB23094@e110439-lin> <20181128144039.GC23094@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28-Nov 15:55, Vincent Guittot wrote: > On Wed, 28 Nov 2018 at 15:40, Patrick Bellasi wrote: > > > > On 28-Nov 14:33, Vincent Guittot wrote: > > > On Wed, 28 Nov 2018 at 12:53, Patrick Bellasi wrote: > > > > > > > > On 28-Nov 11:02, Peter Zijlstra wrote: > > > > > On Wed, Nov 28, 2018 at 10:54:13AM +0100, Vincent Guittot wrote: > > > > > > > > > > > Is there anything else that I should do for these patches ? > > > > > > > > > > IIRC, Morten mention they break util_est; Patrick was going to explain. > > > > > > > > I guess the problem is that, once we cross the current capacity, > > > > strictly speaking util_avg does not represent anymore a utilization. > > > > > > > > With the new signal this could happen and we end up storing estimated > > > > utilization samples which will overestimate the task requirements. > > > > > > > > We will have a spike in estimated utilization at next wakeup, since we > > > > use MAX(util_avg@dequeue_time, ewma). Potentially we also inflate the EWMA in > > > > case we collect multiple samples above the current capacity. > > > > > > TBH I don't see how it's different from current implementation with a > > > task that was scheduled on big core and now wakes up on little core. > > > The util_est is overestimated as well. > > > > While running below the capacity of a CPU, either big or LITTLE, we > > can still measure the actual used bandwidth as long as we have idle > > time. If the task is then moved into a lower capacity core, I think > > it's still safe to assume that, likely, it would need more capacity. > > > > Why do you say it's the same ? > > In the example of a task that runs 39ms in period of 80ms that we used > during previous version, > the utilization on the big core will reach 709 so will util_est too > When the task migrates on little core (512), util_est is higher than > current cpu capacity Right, and what's the problem ? 1) We know that PELT is calibrated to 32ms period task and in your example, since the runtime is higher then the half-life, it's correct to estimate a utilization higher then 50%. PELT utilization is defined _based on the half-life_: thus your task having a 50% duty cycle does not mean we are not correct if report a utilization != 50%. It would be as broken as reporting 10% utilization for a task running 100ms every 1s. 2) If it was a 70% task on a previous activation, once it's moved into a lower capacity CPU it's still correct to assume that it's likely going to require the same bandwidth and thus will be under-provisioned. I still don't see where we are wrong in this case :/ To me it looks different then the problem I described. > > With your new signal instead, once we cross the current capacity, > > utilization is just not anymore utilization. Thus, IMHO it make sense > > avoid to accumulate a sample for what we call "estimated utilization". > > > > I would also say that, with the current implementation which caps > > utilization to the current capacity, we get better estimation in > > general. At least we can say with absolute precision: > > > > "the task needs _at least_ that amount of capacity". > > > > Potentially we can also flag the task as being under-provisioned, in > > case there was not idle time, and _let a policy_ decide what to do > > with it and the granted information we have. > > > > While, with your new signal, once we are over the current capacity, > > the "utilization" is just a sort of "random" number at best useful to > > drive some conclusions about how long the task has been delayed. > > > > IOW, I fear that we are embedding a policy within a signal which is > > currently representing something very well defined: how much cpu > > bandwidth a task used. While, latency/under-provisioning policies > > perhaps should be better placed somewhere else. > > > > Perhaps I've missed it in some of the previous discussions: > > have we have considered/discussed this signal-vs-policy aspect ? What's your opinion on the above instead ? -- #include Patrick Bellasi