Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp572841ybv; Thu, 13 Feb 2020 05:56:34 -0800 (PST) X-Google-Smtp-Source: APXvYqznRUidigLVD29vp+gvvBsDoWy6/uEcSve63WK/xTWRPaJAtKr+Z2GU2Q2g8p1b6RC+GsQ0 X-Received: by 2002:aca:1b11:: with SMTP id b17mr2990446oib.45.1581602194225; Thu, 13 Feb 2020 05:56:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581602194; cv=none; d=google.com; s=arc-20160816; b=ZKEBZ4YPN1wls3VW4dBUmrkAI7h1SVR/t2Bbnk15eo8lNFRBxZUarG4pPO3CFg9jxU a/InW9J2p7RIRwjS2Ckc5eJv+rUnnu0HqVrsfRo//FYC/f9CvbOx3X3vdolTiXOQsK9L 6uLoQOjbhSVMnxonTv2h3pS1Z0TDHu7TXfhFVZRQfKaPTFXFhlI6u7jPKwTyttcZSXET VB8dAIQGK2dltvrCqvPLBsEQLMmxB27Bmy6j36viboFmXZZ2X92BykZVfxIxOMPYVHXa RGuL4v36GhGWl3i/qGnfQoigXLgq0YNGjlexP01bqsnKs7V9eQeb44k++pExMqFfkkrO fIwQ== 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=+3mv3to/fHwh461fSGpxG9+oD/Xobt954dTA/Spw8rM=; b=PRPkUuKV4k5G4yWbdE2BWrtGN+vMU1PGEYG/g9dYRJOJcYiDWUn7arLSb3c7uVu1AQ rQ9QCoumjfVab0/m3N2/mPifUEMEZciAkOV8wDelIxDOGq5tu0R5mrv+oiImbOIk79RL CzCjnH6v9ODIO4IbSWJIvms0rj8EnekAWlxVQL0bdStEzG/fETlpU+uAq+UGNbiDrMS5 JOpgeYLUItMoS+dblVjrCdBJznSzdY/SqqzMpXvmwZZArOT6a3AxzPRBnUO00I6fg8UO HRsn80n5IjY5vcRGs4eF+dcEdzFiIDr3QZ8guTo2D+Y65DLJujDPv+igqSEDTrc6y6Gh XiOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fJ3aBK7d; 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 t4si1086536otc.160.2020.02.13.05.56.21; Thu, 13 Feb 2020 05:56:34 -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=fJ3aBK7d; 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 S1730055AbgBMNzD (ORCPT + 99 others); Thu, 13 Feb 2020 08:55:03 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:33981 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729961AbgBMNzC (ORCPT ); Thu, 13 Feb 2020 08:55:02 -0500 Received: by mail-qk1-f194.google.com with SMTP id c20so5723592qkm.1 for ; Thu, 13 Feb 2020 05:55:02 -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=+3mv3to/fHwh461fSGpxG9+oD/Xobt954dTA/Spw8rM=; b=fJ3aBK7dHNFbg+Gb26hepJnaElzlMxYeeAkL1K/jNcdTAqEpDAJTgLI1SHN3AsMorW vQVzoky6ZEhl0BVgIPT/oIasLHQwKJb3/wqpa5ihVVn1F6yQg6qtnlQpf+TsJT87NBPo +3D2RgUZahtqzoSggIfFvB2hO1fkarnSyWA6fL87nR0GhzoX0zzFzBTrUhkbG2zcPwt9 BDU79c5Pw74J772y4JOMDXNknvkLHHR/nXh1XFPKFD9kTOAVSYxHYCFmZpfdBtJEdKiA ZedxDmTWQCnEHy0t2YJXsVtpwQKf+hqZSqyFSKqc+R0hNBdbok22Y6iiMz4RO2m0mP3n gYoQ== 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=+3mv3to/fHwh461fSGpxG9+oD/Xobt954dTA/Spw8rM=; b=lSbO47/ddw8nRUoU2zcaabtr1eFN3uTBXzHUUXwQpAe+BazR7WzpqxijA6qhIJDYHt 2iTwBtFDqnm04VPELxPcEvP+0Ij/oTqPH0HYz/solICA4xYwmd9MPxV2l+2n92HOZ8Rj NkJmK/N7RXfp9uMBpL1AF2K/qmhDsibWApkbDlra22EI6rkUWjPghTLXG6m5TLiF/r+x b1I/DICzB9KQ/EjuL1gu0KTxJAX7nOsmW+xE427fP3nQYYyGDd5ks+Yzrvd+NxWP/e7Y IPMZh76SRxyA+Bxgjqp0RrRa7VU9cP7gGhSHaTTVvMK0yx0/EnoV2W0f+m0SHnicltLl IPUg== X-Gm-Message-State: APjAAAWWTrKjISGMpmtRiizqpiQXE2+OVDsTsK6UuI7H14Xyk7fwdVAq FjyTFR9dtKwQOyWKuMSusb2FSg== X-Received: by 2002:a05:620a:1426:: with SMTP id k6mr13575444qkj.276.1581602101376; Thu, 13 Feb 2020 05:55:01 -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 c14sm1335108qkj.80.2020.02.13.05.54.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Feb 2020 05:55:00 -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> <5E3DE7CC.3060300@linaro.org> 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: <5E455533.3000600@linaro.org> Date: Thu, 13 Feb 2020 08:54:59 -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/10/2020 06:59 AM, Dietmar Eggemann wrote: > On 07/02/2020 23:42, Thara Gopinath wrote: >> 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: > > [...] > >>> 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. > > I'm still in favor for this. And Vincent seems to be OK as well: > > https://lore.kernel.org/r/CAKfTPtBzoLnvAJ7sjPogMYS=WwBbdzWO07Kj=KDFVpO4=Su5ow@mail.gmail.com > > The 'v6->v7' change note: > > - Renamed arch_scale_thermal_capacity to arch_cpu_thermal_pressure > as per review comments from Peter, Dietmar and Ionela. > > is really not saying from which review comment the individual changes in > the function name are coming from. And I don't see an answer to Ionela's > email saying that her proposal will manifest in a particular part of > this change. Hi Dietmar, Like I said, don't want to argue on name. It is trivial for me. I have v10 prepped with the name change. Will send it out shortly. > >>> (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. > > Cpu-invariant accounting can't be guarded with a kernel CONFIG switch. > Frequency-invariant accounting could be with CONFIG_CPU_FREQ but this is > enabled by default by Arm64 defconfig. > Thermal pressure (accounting) (CONFIG_HAVE_SCHED_THERMAL_PRESSURE) is > disabled by default so why should a per-cpu thermal_pressure be > maintained on such a system (CONFIG_CPU_THERMAL=y by default)? I agree that there is no need for per-cpu thermal pressure to be maintained if no averaging is happening in the scheduler, today. I don't know if there will ever be an use for it. My issue has to do with using a config option meant for internal scheduler code being used else where. To me, once this happens, the entire work done to separate out reading and writing of instantaneous thermal pressure to arch_topology makes no sense. We could have kept it in scheduler itself. Another way I think about this whole thermal pressure framework is that it is the job of cooling device or cpufreq or any other entity to update a throttle in maximum pressure to the scheduler. It should be independent of what scheduler does with it. Scheduler can choose to ignore it. > -- Warm Regards Thara