Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp385320yba; Fri, 26 Apr 2019 01:36:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfI9q4CTelo5mi0fSiYGjja1xlrvo9Kg2MymOdLTV5vi3BgCCa4l7D4aETUbsYPGaX02ek X-Received: by 2002:a65:42cd:: with SMTP id l13mr19895121pgp.351.1556267818791; Fri, 26 Apr 2019 01:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556267818; cv=none; d=google.com; s=arc-20160816; b=YrLyUIDy7Pbx8zFwRVQ1lrNQ74IjsAByPAeP9U8sqz7Fo6SBNFw2uFOTozijpCamHk bpXq288pEnBnYj+TXnzoS76g2oNgWDsyQQROJB2U/JQIUIshaCh7w7rGW7ZIX5KL9f6G Z0VWtR6s4iAjeB2W6YnxokA7pGkCj6FrjZaPvZqNmQMFRA6AfAZNbELelyaxiaSSA4fP FcunuhbRQ31Lb/JhEwjkZtCwwH05e8nRuoEQI1NazK8Jzocy7o/vgpCYAWGjh/UwKrmb vIDBK8TpzIDv1zmzSfAiCFCua3NR3pXjKUidgiZENjo8y2DyuDIe2oQzcyYLaexykoSh EBCA== 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; bh=auh2n5ez8f3k8JtxERTzIFczyJO/2QRKYQZuO2eMI80=; b=NE0wz99Filr/e+C7p4LbvROktdIUT9zr1MypqtfCYFGhQYAB2dXdvmVfflWObzMUcd Ma6kwJp6UxeUwuWQcro20XNaoF/aOo3E2lucWvdguP4o82xS/tws1LChqqJcyUQ+pfSv TynWOlpuwkoPEs02bsKz/kGs5SNvBUNhcdDGlpese5UN85XaZFJ5g+RWVdRANG6clgyy o87ZlR+jp3toZasTTKZKzJD68L8ltHj0Fqq/wuuYXg/Ut/GVVmkhCzTzgGqH43OaK5Nk ByPB5igrtuyUCsB/Anjt06FsrXz7wgnI42h+Jdb/EkY3jadWzX7XoTqzwRVw9nzAFC/y OpOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DBmHizx3; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m18si24917537pls.18.2019.04.26.01.36.42; Fri, 26 Apr 2019 01:36:58 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=DBmHizx3; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726058AbfDZIft (ORCPT + 99 others); Fri, 26 Apr 2019 04:35:49 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:56053 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbfDZIfs (ORCPT ); Fri, 26 Apr 2019 04:35:48 -0400 Received: by mail-wm1-f65.google.com with SMTP id o25so2711298wmf.5 for ; Fri, 26 Apr 2019 01:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=auh2n5ez8f3k8JtxERTzIFczyJO/2QRKYQZuO2eMI80=; b=DBmHizx3C8v5SJgwIiJorLVtGcbi+kk7TVMw9v//OzwQnudYqHFH6yGePov3jews/n dhZE7R7yZBMdt57zD9kI86qYnCq7CFaxDaQvukOv2qoot+6GGZ4GWDIrke7L4Sy7jb2L 3SCY9wXZBmd6JJzTAqfybsnGqx3f03b2BEWuQxfWO+tPQpNjgkDzqryy7SfGsUS7EbeH zo1pAT5xsatgFVOOP4OnIRvhjkBqL+l2ZD25zEX8uGbmiBbGMtHrI/0r3CTcRx7K8bLc Mz1m1XhTcXQb3BupnPdQ3uk3bDBWXZfJI61nn4FZQMOsM8NFvk2NSeywbiMtcw7X3QFU 6CKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=auh2n5ez8f3k8JtxERTzIFczyJO/2QRKYQZuO2eMI80=; b=GCQLST1ZL1JwH8kvu3Gxn4YCTdWG5dhzDCDzgq25VAI3LIzTLXK/zfzo3WAfN7TDj2 ttCoYHBQsEJaJJNOUd8y55mhyCnwl7/a1Wg7ynbQ7ui6WL/wsXMOE9vKmTaRG9vhUAm+ AZEpNQ3kFdkmQUeSAHybKVZFuwZgZ5D9DJC8pgvqczxRB9T68+2lQi4GsnXV9yha7EjW BdqIfCSMlTrbWfQtJyR/EYFKgLhVO0+9CMydy7lByUvbd0UCruffdrTY8TR5pt1CBDrq XbGF5N784fSo4+8pMe8+77OF/fTt95PupzGUeRX4CcfvWiH+NlrEK5XKOR5t0O0+0Sle hTcg== X-Gm-Message-State: APjAAAWgGgtVLVK+LfnPJdw2st5wlzi1eXvEbQxK24FfayQoEQcSFyQu I7SyI4xcvTl3zoyJ4Yr3j7A= X-Received: by 2002:a1c:7f10:: with SMTP id a16mr6628017wmd.30.1556267747054; Fri, 26 Apr 2019 01:35:47 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id z4sm2773615wrq.75.2019.04.26.01.35.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2019 01:35:46 -0700 (PDT) Date: Fri, 26 Apr 2019 10:35:43 +0200 From: Ingo Molnar To: Vincent Guittot Cc: Peter Zijlstra , Thara Gopinath , Ingo Molnar , Zhang Rui , linux-kernel , Amit Kachhap , viresh kumar , Javi Merino , Eduardo Valentin , Daniel Lezcano , Nicolas Dechesne , Bjorn Andersson , Dietmar Eggemann , Quentin Perret , "Rafael J. Wysocki" Subject: Re: [PATCH V2 0/3] Introduce Thermal Pressure Message-ID: <20190426083543.GB126896@gmail.com> References: <1555443521-579-1-git-send-email-thara.gopinath@linaro.org> <20190417053626.GA47282@gmail.com> <5CB75FD9.3070207@linaro.org> <20190417182932.GB5140@gmail.com> <20190424163424.GG4038@hirez.programming.kicks-ass.net> <20190425173333.GA4081@gmail.com> <20190425174425.GA121124@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Vincent Guittot wrote: > On Thu, 25 Apr 2019 at 19:44, Ingo Molnar wrote: > > > > > > * Ingo Molnar wrote: > > > > > > > > * Peter Zijlstra wrote: > > > > > > > On Wed, Apr 17, 2019 at 08:29:32PM +0200, Ingo Molnar wrote: > > > > > Assuming PeterZ & Rafael & Quentin doesn't hate the whole thermal load > > > > > tracking approach. > > > > > > > > I seem to remember competing proposals, and have forgotten everything > > > > about them; the cover letter also didn't have references to them or > > > > mention them in any way. > > > > > > > > As to the averaging and period, I personally prefer a PELT signal with > > > > the windows lined up, if that really is too short a window, then a PELT > > > > like signal with a natural multiple of the PELT period would make sense, > > > > such that the windows still line up nicely. > > > > > > > > Mixing different averaging methods and non-aligned windows just makes me > > > > uncomfortable. > > > > > > Yeah, so the problem with PELT is that while it nicely approximates > > > variable-period decay calculations with plain additions, shifts and table > > > lookups (i.e. accelerates pow()), AFAICS the most important decay > > > parameter is fixed: the speed of decay, the dampening factor, which is > > > fixed at 32: > > > > > > Documentation/scheduler/sched-pelt.c > > > > > > #define HALFLIFE 32 > > > > > > Right? > > > > > > Thara's numbers suggest that there's high sensitivity to the speed of > > > decay. By using PELT we'd be using whatever averaging speed there is > > > within PELT. > > > > > > Now we could make that parametric of course, but that would both > > > complicate the PELT lookup code (one more dimension) and would negatively > > > affect code generation in a number of places. > > > > I missed the other solution, which is what you suggested: by > > increasing/reducing the PELT window size we can effectively shift decay > > speed and use just a single lookup table. > > > > I.e. instead of the fixed period size of 1024 in accumulate_sum(), use > > decay_load() directly but use a different (longer) window size from 1024 > > usecs to calculate 'periods', and make it a multiple of 1024. > > Can't we also scale the now parameter of ___update_load_sum() ? > If we right shift it before calling ___update_load_sum, it should be > the same as using a half period of 62, 128, 256ms ... > The main drawback would be a lost of precision but we are in the range > of 2, 4, 8us compared to the 1ms window > > This is quite similar to how we scale the utilization with frequency and uarch Yeah, that would work too. Thanks, Ingo