Received: by 10.223.185.116 with SMTP id b49csp4976274wrg; Wed, 7 Mar 2018 04:26:03 -0800 (PST) X-Google-Smtp-Source: AG47ELuVfjXb8R/7NFJg/Gd+vMI1xkucXk7lkU7LwgobT0RWcvPFRdSNGtBWF9KIW9qBj3zrZtF+ X-Received: by 2002:a17:902:ab8c:: with SMTP id f12-v6mr19932322plr.171.1520425563409; Wed, 07 Mar 2018 04:26:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520425563; cv=none; d=google.com; s=arc-20160816; b=Q+4/qf34jdh7aU1V+qFbm8UyWHeJCQFu9uFnnpk/q4DeiUf55IkekcYLdi9xIuwRZ7 DOB2cFY9SCwbW6Qx8he3cn5WIpD2OZpfozr2MOZeAgeACBNT71ms3xnzA2jZ2fsyTIR5 aub/m3B59gffeUe/qXQ+C6dvYcVn4inqqBgC8T/YTCOtYc5KX9x0wYNCtvhyCB/Nrdxi rvU2pZoWwv6PmpmB2anUKOvoM6y8/MZYj6B1mxiy06DHPO/HHv4hpyOHKwE8WuWdJsXX m7zzN1vVDCWr+RQf2juwZq8H8Onm9Hng7lRmEt2+h6oaqQUkVqMzm3joqK0wdd6eqcl/ ux3Q== 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:dkim-signature:arc-authentication-results; bh=haoD0PMN2YdVOSa+fOJKfnqVDFoWcbWCAbgpsskLRX8=; b=l+UFL7z62EIZT5g3QBrf2LRYJOgw2PZa5ubuOmr6bmaHNdOSqTr7il2r7AQ1iKRTzl a63Tq7tS/xpH+jlCBln3Pw9VMlNcQ6t+0MY1c0tCjh5lZf9n/X3PMctlHBCgGd3iebK8 aAxE3GUHGKIlaSsvWvHbCrgJXj+6UHsMbudeb5pv+V7GpihGv3MWqMe9dsK4YWvPNuP6 w8sC+8rcPPXW3hPR3pl3JjtP5nFKiOhxgZVqOAlHykBCF9EbeE2iKffmmz5dECToQggS OOsDDOzXSPsuSlhbRyu1maIw96AIWyYM/bFhVVkcrYkIa5SKFm/6Qejal8sR8mQh3Cpr /0Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=rPoPH75F; 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 b6si11326442pgr.640.2018.03.07.04.25.47; Wed, 07 Mar 2018 04:26:03 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=rPoPH75F; 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 S1751284AbeCGMYz (ORCPT + 99 others); Wed, 7 Mar 2018 07:24:55 -0500 Received: from merlin.infradead.org ([205.233.59.134]:43600 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751073AbeCGMYx (ORCPT ); Wed, 7 Mar 2018 07:24:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=haoD0PMN2YdVOSa+fOJKfnqVDFoWcbWCAbgpsskLRX8=; b=rPoPH75F80T/tmlq+FlEuyIFd wqsJFoZBkec1MXTz76W9TsbEeyM+VNokGe+1kOMH3zjGq0R/K4NlGB/dE2c3AAfzPPurh+JlTAmY2 Afs7qALLYV0smju9LTt0hqOk+L9xv4Zh9i9ng6zygDixvMP8/khNnhNwWwefSzMKSm1yVqFjaVJEN FggOJj3bfAozi7SlPYJLbW6YgAgP9UJ0txW4XKsznAJ3OrvV7rGwGzBVwfBetGBnm/c8fr909Lja+ ZDJc3gqDO59J2kYo2Bo7sYr04fKdKSV0Polr/w0Y3ihNHGr3D6SJPft7/cPIPYZ5mMXRlUjFwOqVd qOK97HeQA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1etY7b-00043y-0a; Wed, 07 Mar 2018 12:24:39 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BBC3D2029FA14; Wed, 7 Mar 2018 13:24:37 +0100 (CET) Date: Wed, 7 Mar 2018 13:24:37 +0100 From: Peter Zijlstra To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Paul Turner , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle Subject: Re: [PATCH v5 1/4] sched/fair: add util_est on top of PELT Message-ID: <20180307122437.GM25181@hirez.programming.kicks-ass.net> References: <20180222170153.673-1-patrick.bellasi@arm.com> <20180222170153.673-2-patrick.bellasi@arm.com> <20180306185851.GG25201@hirez.programming.kicks-ass.net> <20180307113149.GA2211@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180307113149.GA2211@e110439-lin> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 07, 2018 at 11:31:49AM +0000, Patrick Bellasi wrote: > > It appears to me this isn't a stable situation and completely relies on > > the !nr_running case to recalibrate. If we ensure that doesn't happen > > for a significant while the sum can run-away, right? > > By away you mean go over 1024 or overflow the unsigned int storage? the later, I think you can make it arbitrarily large. Have a busy task on CPU0, this ensure !nr_running never happens. Start a busy task on CPU1, wait for it to hit u=1, then migrate it to CPU0, then wait for it to hit u=.5 then kill it, this effectively adds .5 to the enqueued value, repeat indefinitely.