Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1109132ybv; Fri, 7 Feb 2020 14:43:37 -0800 (PST) X-Google-Smtp-Source: APXvYqzcMMMiJ2xJV6DQ301BWec+eeHBcUjtep8MZbLQWlgS3+hDLqCUZpyPrEWnwyDKlIv219KA X-Received: by 2002:aca:5f87:: with SMTP id t129mr3717844oib.36.1581115416917; Fri, 07 Feb 2020 14:43:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581115416; cv=none; d=google.com; s=arc-20160816; b=0T2Q2MMU3zfuUuLPQRKpsoGzakUtgb+vQNK7cZxHKTlf1Ldg2Cik24kVOHEwf3ayGY AKAFyGNLlAjm6w5utGVIEhkxYB4sGDSQ1UNh2IW4c9LK0d/mR+c5+UtgNaikDxCJT8G3 DlTgOwVAniQtZ/x33EuAdoiqvdEC8mne8mahuxqZuOhFNgDowVJcDO1KPoUZcYC+lCFL GYpR+Ny9/st8OirP8EIHIhuDGTqL5S79fvnMD+T1RP+uLDp1AvPLCnRCf6FCZ/ppCJbr 3aIHG7C8s5ocRZ+2AxBsimQTNkY3sy9Hl7NM7320Rbp84+/xxFFKnxPnWIgUbeZvBT6i mDpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature; bh=b8ELsuL/4y/dUcHo4qnKyfHC0iWe18inSa5wdgKcHxo=; b=UeE/6DDug11FR7fiRztyi+oobbPfjFdXJGwNY42c5u6Toqxd072x7rA3fhUsmAqWpU bMn63HHn6ECXjbccWraXuN1bdtMiztJcq/1ZM8ec0ycdpgdbGcvEGJsSKhLL3pPNO6re 4msCu0/nza1MFcsCl77NZ2kRkeGHBKwQjuQY2XjqMzfOR8/cyZz6RlO5PGItCFkNciY8 cEnzTi0AsztMCSL5BS1F7qYAERLE0g3LHgoAj3sNI/K+ONNDGFSGgBXITEX07r1GU3Py F4hpYeXpO012MZ2Qcd3BMIaJO0YRLvsROFuE5cjuD9lAViXrfdNh3H9I3rmzdm2YnbKQ sa/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kUFJMdRY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k19si385646otp.33.2020.02.07.14.43.23; Fri, 07 Feb 2020 14:43:36 -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=pass header.i=@linaro.org header.s=google header.b=kUFJMdRY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727076AbgBGWmZ (ORCPT + 99 others); Fri, 7 Feb 2020 17:42:25 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:41794 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726947AbgBGWmZ (ORCPT ); Fri, 7 Feb 2020 17:42:25 -0500 Received: by mail-qt1-f196.google.com with SMTP id l19so641453qtq.8 for ; Fri, 07 Feb 2020 14:42:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=b8ELsuL/4y/dUcHo4qnKyfHC0iWe18inSa5wdgKcHxo=; b=kUFJMdRYsNQuOdrZ+ABMAyIosWWcZCk8bVtE09I5nBZk150XJ8ccNCwLhwPDtiZ6SP g84G9A94zFls5rr4/PNlY+MRl5nS6BKRw8rZZRsnQuGRYWIEbye5mx3A4BOoYjCUzGTW XAIFkDqCM0eM/FK4DhA2H8gPoPGToEt57dXh7Phsq38A5xf5+a9SmkJYMI4IbmSVSHg1 4Ayln3HuEqHZ7h0LYftHWOoW02wUVgEFTBKS36wKEbdm5cUkF1Wyke0UmymG/50xMSrz +rPmhZoWYM53b+PoN8+q4kq2ahMsSkMOt9vajE4uAG5CH6IpZfowhJq9oU2YNXOOBF1O pDqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=b8ELsuL/4y/dUcHo4qnKyfHC0iWe18inSa5wdgKcHxo=; b=srRAJPVgOlkFb00s8gctpFC9dTN+cAuKFDCE6OgQYn7YtovuY5mijpPoHYkaucAm/3 v00TwR1l3enrDMITSUtcIYgw36mwS9MkTOn9TiC2c8nErsEs3tAxybE4K47b/r7vzbkX KLA2KvKp4paA07X3NPjfLvqGSpnsRgvvszECli8+hUpayvR01Aw3kOMsBJWY6+srj4zt 8UPBKOujo9eCM2Uhe2wHpsNpvSbAoSnViaoC7Ms1ugr/5TQ4usbc4O1VCk2lwQJlblU3 nOPEJP8SORFKHiFCVoVm0KYYzfSeMZMbgI/X0hHEr20sGp2Tw3oH2oxfKzn1YJNEqatL 2Tpg== X-Gm-Message-State: APjAAAUOiLGIVMQUq5dee7DrN/ITDqHSNDE6HPcDNaNKAYl8FFLly5Vu sO1TD9MDTVGLhiyr4YEY+mZcqvvdMyw54g== X-Received: by 2002:ac8:1977:: with SMTP id g52mr625423qtk.18.1581115342812; Fri, 07 Feb 2020 14:42:22 -0800 (PST) Received: from [192.168.1.169] (pool-71-255-246-27.washdc.fios.verizon.net. [71.255.246.27]) by smtp.gmail.com with ESMTPSA id g18sm2019071qki.13.2020.02.07.14.42.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Feb 2020 14:42:22 -0800 (PST) Subject: Re: [Patch v9 7/8] sched/fair: Enable tuning of decay period To: Dietmar Eggemann , Peter Zijlstra References: <1580250967-4386-1-git-send-email-thara.gopinath@linaro.org> <1580250967-4386-8-git-send-email-thara.gopinath@linaro.org> <4eb10687-1a62-cee3-7285-3f50cc023071@infradead.org> <5E380D1D.7020500@linaro.org> <20200203155549.GL14914@hirez.programming.kicks-ass.net> Cc: Randy Dunlap , mingo@redhat.com, ionela.voinescu@arm.com, vincent.guittot@linaro.org, rui.zhang@intel.com, qperret@google.com, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, rostedt@goodmis.org, will@kernel.org, catalin.marinas@arm.com, sudeep.holla@arm.com, juri.lelli@redhat.com, corbet@lwn.net, linux-kernel@vger.kernel.org, amit.kachhap@gmail.com, javi.merino@kernel.org, amit.kucheria@verdurent.com From: Thara Gopinath Message-ID: <5E3DE7CC.3060300@linaro.org> Date: Fri, 7 Feb 2020 17:42:20 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/04/2020 03:39 AM, Dietmar Eggemann wrote: > On 03/02/2020 16:55, Peter Zijlstra wrote: >> On Mon, Feb 03, 2020 at 07:07:57AM -0500, Thara Gopinath wrote: >>> On 01/28/2020 06:56 PM, Randy Dunlap wrote: >>>> Hi, >>>> >>>> On 1/28/20 2:36 PM, Thara Gopinath wrote: >>>>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt >>>>> index e35b28e..be4147b 100644 >>>>> --- a/Documentation/admin-guide/kernel-parameters.txt >>>>> +++ b/Documentation/admin-guide/kernel-parameters.txt >>>>> @@ -4376,6 +4376,11 @@ >>>>> incurs a small amount of overhead in the scheduler >>>>> but is useful for debugging and performance tuning. >>>>> >>>>> + sched_thermal_decay_shift= >>>>> + [KNL, SMP] Set decay shift for thermal pressure signal. >>>>> + Format: integer between 0 and 10 >>>>> + Default is 0. >>>>> + >>>> >>>> That tells an admin [or any reader] almost nothing about this kernel parameter >>>> or what it does. And nothing about what unit the value is in. >>>> Does the value 0 disable this feature? >>> >>> Thanks for the review. 0 does not disable "thermal pressure" feature. 0 >>> means the default decay period for averaging PELT signals (which is >>> usually 32 but configurable) will also be applied for thermal pressure >>> signal. A shift will shift the default decay period. >>> >>> You are right. It needs more explanation here. I will fix it and send v10. >> >> Or just send an update for this patch? I'm thinking most of this is >> looking good. > > I do agree. IMHO, there are just two little things outstanding: > > (1) arch_scale_thermal_pressure() instead of > arch_cpu_thermal_pressure() in v8 4/7 The "scale_" part was discussed in v6. Ionela had suggested that having "scale" is not suited for this function because "thermal pressure" is not exactly scaled but subtracted. I actually agree with that. https://lore.kernel.org/lkml/20191223175005.GA31446@arm.com/ Having said that if everyone feel the same about naming of this function, I can change it one last time. > > (2) guarding of thermal pressure code in Arm's arch_topology driver w/ > CONFIG_HAVE_SCHED_THERMAL_PRESSURE plus disabling it by default for > Arm64. It was enabled by default as per your suggestion in v9. The patch can be dropped. I don't understand the need to guard arch_topology with CONFIG_HAVE_SCHED_THERMAL_PRESSURE. CONFIG_HAVE_SCHED_THERMAL_PRESSURE is for scheduler to enable/disable averaging of thermal pressure. We wanted to separate updating and retrieving of instantaneous thermal pressure from scheduler. Guarding it with CONFIG_HAVE_SCHED_THERMAL_PRESSURE is to me equivalent to putting back this whole code in the scheduler framework. I am against it. I also do not see other arch_ functions guarded similarly. > -- Warm Regards Thara