Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3517788ybg; Mon, 28 Oct 2019 14:12:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwch7knd+9OxKaKWnkaK+pJn0z/6VeHcWqiHd10oofogooQfeLCgVLLq+IyvYsPZVTQm0Mr X-Received: by 2002:a50:ff19:: with SMTP id a25mr21799692edu.181.1572297173175; Mon, 28 Oct 2019 14:12:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572297173; cv=none; d=google.com; s=arc-20160816; b=dDsKuOorVyOC0/gUVccybyrqu/y2ymcbWaj0ynzxPGDO+W2gqgax5qKtWFRRL2O3NI jrc9fQWaYCCeGO/hWkOJkAEfcYqYGjkNJsszLDhwaMLEZilWC527G9NiVy9eN5tOvgAE lulTNZ/5K/MocsiFqgb0Cw4iy0VvE1EVOy9SWiEvL4A3GD4SaHwF3dmAbqXiFkLM+A9m 3l+GdGvnTdP7RNkPIAwZoE7LchjCpDgTxN6LgqfDapD4A4/ikb1ze269j6R0YEWCmpGk ItMgv9TTLxDEhdDBefJArwunr6Rzl5h04ElqdJ4JUu5Y38JRV+mchJJdfiR21YRWa3rf GkOw== 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=Y9FSTf7Pat5WWzPypxPIrhd4tE/BrFztAPkC/CBMzFk=; b=wKB40DBphj/jnCMdkmc2X5VzqNolkyMsSchuB+OiAJZUHmBsOfBa085h/L+6NI3N95 WJ0QvoF8DnLt7KNPfrxGykr9/DJWY4R8wWG+lr8IDWswQqw/OzA8dLWzCjABZVd+/hKE fH8eBK0QMeLRsUcYh8qNpQPg/zVbvx9ceb5701kJizFLofY4QIcuy/QAYZQxpfiY+2sR oxvVaAZgHJSopX5gNGbtLJwrXLdWOqACSGkkCP3H79RB6htUjt6GW8Z8HYOzb/mSehim AZ+bGWaLqlWCsSHFf/krMkbM0v45G8ilcDQSpyERQjrSwnJDOjeaiPqoV5YpDBfQEHUR bCBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=BHZDurOt; 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 h43si8130888edb.89.2019.10.28.14.12.29; Mon, 28 Oct 2019 14:12:53 -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=@infradead.org header.s=merlin.20170209 header.b=BHZDurOt; 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 S2389698AbfJ1Pm0 (ORCPT + 99 others); Mon, 28 Oct 2019 11:42:26 -0400 Received: from merlin.infradead.org ([205.233.59.134]:59360 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726025AbfJ1Pm0 (ORCPT ); Mon, 28 Oct 2019 11:42:26 -0400 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=Y9FSTf7Pat5WWzPypxPIrhd4tE/BrFztAPkC/CBMzFk=; b=BHZDurOtErHBKB2DAcyrHqi5L 6/neIbxbmxrz9jPSfWQz2z1WDDoxI1OlZ5sFtaQpT/40FR7GAylGq3cfBglhSVDySz79zVrHkI4Xl 4ei0vvZVpP5Jgp/dd8oi7WXPI88oMH259hdL95lx6gGO6tVAznOd2zK0fm2cYJ0y91bUmq7ediqhH Roent3/QBbA/JaHgOp5PMMRBqsUbMQ4npfkFaBlfqBtNNO5nQm5vt01DevpO/mcq/S2DwaL/Dsxe2 fmx7sgXUGwyVjjnALnqbVj8tAtQf56LXgF2RmK5MY1Ne0UojHb0oze7bEOpsJ9KPGMBA+S2w1ixTu 1bjKjoLDA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iP79o-0003Jw-DW; Mon, 28 Oct 2019 15:42:12 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 5201D300E4D; Mon, 28 Oct 2019 16:41:10 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8823C2B4468CD; Mon, 28 Oct 2019 16:42:10 +0100 (CET) Date: Mon, 28 Oct 2019 16:42:10 +0100 From: Peter Zijlstra To: Thara Gopinath Cc: mingo@redhat.com, ionela.voinescu@arm.com, vincent.guittot@linaro.org, rui.zhang@intel.com, edubezval@gmail.com, qperret@google.com, linux-kernel@vger.kernel.org, amit.kachhap@gmail.com, javi.merino@kernel.org, daniel.lezcano@linaro.org Subject: Re: [Patch v4 6/6] sched: thermal: Enable tuning of decay period Message-ID: <20191028154210.GG4097@hirez.programming.kicks-ass.net> References: <1571776465-29763-1-git-send-email-thara.gopinath@linaro.org> <1571776465-29763-7-git-send-email-thara.gopinath@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1571776465-29763-7-git-send-email-thara.gopinath@linaro.org> 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 On Tue, Oct 22, 2019 at 04:34:25PM -0400, Thara Gopinath wrote: > Thermal pressure follows pelt signas which means the > decay period for thermal pressure is the default pelt > decay period. Depending on soc charecteristics and thermal > activity, it might be beneficial to decay thermal pressure > slower, but still in-tune with the pelt signals. > One way to achieve this is to provide a command line parameter > to set the decay coefficient to an integer between 0 and 10. > > Signed-off-by: Thara Gopinath > --- > v3->v4: > - Removed the sysctl setting to tune decay period and instead > introduced a command line parameter to control it. The rationale > here being changing decay period of a PELT signal runtime can > result in a skewed average value for atleast some cycles. TBH, I don't care too much about that. If you touch a knob, you'd better know what it does anyway. > void trigger_thermal_pressure_average(struct rq *rq) > { > - update_thermal_load_avg(rq_clock_task(rq), rq, > + update_thermal_load_avg(rq_clock_task(rq) >> > + sched_thermal_decay_coeff, rq, You see, 'coefficient' means 'multiplicative factor', but what we have here is a negative exponent. More specifically it is a power-of-2 exponent, and we typically call them '_shift', given how we use them with 'shift' operators.