Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2321242yba; Thu, 25 Apr 2019 14:29:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQZ3r5qIo9hFap3hsBr5kQfaALEdvycy6Kg1nRYcOhEJ8+B6vIbm5dSW8/ikQPzU2uhRyk X-Received: by 2002:a63:b305:: with SMTP id i5mr39510495pgf.274.1556227780578; Thu, 25 Apr 2019 14:29:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556227780; cv=none; d=google.com; s=arc-20160816; b=i2pO0mIYHrEORwXeChs98CDSF/UpR3ebvCGpM7U+r7isFTsE4/mxubMtC4jhjYx4Ye 2Lz9F8Lrv7pXu4TUpFK6qSf8TFYguLgYw+qjpQm0mCHviAlEp5Dfzbzje3wJdeu3I4Gb sKY41Go2i03B4ZdcZGE6uCG+6uYtrNppVvCPGIb3zdU25L7GSJXReR5iHhREoq5VnvVW K0TwHVMblsYuYPykBoVfLsAuEbxgVtbRJJN/pbBpOmi13qQAZmQYLICVIjFOk5n9XC2Z GOwKLC14gHvJQ53bE03dJpNcRcdH+DQUW+qb3a8lZOhZmU5ZWE9pGRZzmW/QRkEFsCUw 6AFA== 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=Xm2/cwTdPPGF1yC/BRPfGQgynoGVvF0gmfXfN3IZSZM=; b=NqaYYWiCGTR/+WxRZfWdT1Txs8egpdKTWydDMObNxl2fvjfuk89ncDXT7SEUuk1T4f pQXnq2eYO8ChYjWRXUmdncJ6DAcS00GmMR/bO9ud3w643n92+UZEdyipa5HZ5DvrZ/zT O8tJ1XB5QuQolC4OtMBYjbLJra1NdHsE5+ewzn7tIqeZxwFbWdgFaDhpum1PTMKS5bnq NNw5jJo00KkAQ/ZuweIV2C0Ma+O+mYFxUZi/wF8D/ZqyTdfGRWYF/GKwh1KrLdmJBtg3 oDVS/8J7pV1yA/DpVoTkQ8+L0w79wdPUl4VLI+CVsy2xlZnmssNa9TPJD4BXct8qragU G5QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bQQ20QAf; 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 60si24327741plf.122.2019.04.25.14.29.24; Thu, 25 Apr 2019 14:29:40 -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=bQQ20QAf; 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 S1729866AbfDYRob (ORCPT + 99 others); Thu, 25 Apr 2019 13:44:31 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33795 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725937AbfDYRoa (ORCPT ); Thu, 25 Apr 2019 13:44:30 -0400 Received: by mail-wr1-f66.google.com with SMTP id c6so611659wrm.1 for ; Thu, 25 Apr 2019 10:44:29 -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=Xm2/cwTdPPGF1yC/BRPfGQgynoGVvF0gmfXfN3IZSZM=; b=bQQ20QAfDR4TKzZBVf8ATmqMnCwDRSxTjXyjp0ybW/xE0jSQPgrc/7SbaHnD7ggODZ 3mC1CW+zSpdBB1usoR1tLWn9HsquYd0Hug9JJqiGDwhW1cNuAwljO2Jfqs2X4B/bh/Gf MpMPrlhiik23co521gdo/p7qUml+zti2jDlQXBE6rv8fZjMMRejw2Y5LMG8SIJJH7JPn t10YBAFyPDiZkcoHyzpXoilyJPyPwWdAvo/PEChBuR1DFSDZR3WBq3AE1lPeaCWSQ3h9 6b94bJ8CMYH0KaMLzyIvVhYpqG7Be4s2+JPxIbwwoWUK39G+VZy6nsgSsW1/QoOSH01k ayMg== 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=Xm2/cwTdPPGF1yC/BRPfGQgynoGVvF0gmfXfN3IZSZM=; b=AIX+Mp/Iu3buDbrUreSoyn3loZLF3J/JCzLtG9zwmvbmWUHLxRs6TIUA06FLw6TpRx OLwI8JazuBJGZ1gib8R1K9+jUIpnfWQFwIQknAZoyoNM6p409NbIcaDlcxcS+9EkTRK5 d80gNmz8nFdpk73j5NbjEhPquNfPzDjyuyb+IamoGC0dSeSVcogFl8sK+CpzriRK77CI dxVCvi3HomaisJFMS1tr0b4RNtzkqqKzMlnPoU+mr646V9MQKMAboLEDQovWiGMG4rtK ycHVBB8Gk7px2yD4WlgjDfNTEcakEo1IgCpqgkbmlh43bmkR14NFGu1zedBFt/PYJRdF b5pg== X-Gm-Message-State: APjAAAWp+2fu6keMvXLW4ymwuy+NRjalZ6unHqDMD1jRizobPaLdCD0o tfBW39DhqX4pBxY0RZbdUvyZjecR X-Received: by 2002:adf:b3d4:: with SMTP id x20mr28922841wrd.284.1556214269212; Thu, 25 Apr 2019 10:44:29 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id q24sm19503259wmj.26.2019.04.25.10.44.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2019 10:44:28 -0700 (PDT) Date: Thu, 25 Apr 2019 19:44:25 +0200 From: Ingo Molnar To: Peter Zijlstra Cc: Thara Gopinath , mingo@redhat.com, rui.zhang@intel.com, linux-kernel@vger.kernel.org, amit.kachhap@gmail.com, viresh.kumar@linaro.org, javi.merino@kernel.org, edubezval@gmail.com, daniel.lezcano@linaro.org, vincent.guittot@linaro.org, nicolas.dechesne@linaro.org, bjorn.andersson@linaro.org, dietmar.eggemann@arm.com, Quentin Perret , "Rafael J. Wysocki" Subject: Re: [PATCH V2 0/3] Introduce Thermal Pressure Message-ID: <20190425174425.GA121124@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190425173333.GA4081@gmail.com> 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 * 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. This might just work out right: with a half-life of 32 the fastest decay speed should be around ~20 msecs (?) - and Thara's numbers so far suggest that the sweet spot averaging is significantly longer, at a couple of hundred millisecs. Thanks, Ingo