Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2331928ybx; Fri, 8 Nov 2019 02:54:38 -0800 (PST) X-Google-Smtp-Source: APXvYqzmhhgg4x1JQ1ULMTaJ8VrOeDnumdVKCiy1oTFnRGZrpYhIzqHhMxt/IRhNvnd9T3rgPo8N X-Received: by 2002:a50:870c:: with SMTP id i12mr9183982edb.16.1573210478045; Fri, 08 Nov 2019 02:54:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573210478; cv=none; d=google.com; s=arc-20160816; b=XVo8/F1+bv7xGDFixhb5plv3XaLMUT3g068kU4H4ysTZkJ+/49shZh29Nl8lwBlKsw Kjj1LZUNHm6qQLRdy0CnzVEe17zO13lg+XngRzrChJyRCCGzrEh5InUa6Ia2GBQl62TI B0OQRHaZY9YoxfyxGIlPyOGWB41bCU626eaPLAguy3OuuqOvoT8BnN3kwT7JNv4ahnnS oBkrNweJpFjBh0FA8QfVYELqGMTEQAdPbY9qb03yeNCT5sRndPtzWKUdX7JE4Ya89GsY Myo8ShdXZMUvJjl1DpBfeMXnec4C4C9/6ZOgGjh9BjzUqzLUltWs7+pcyaUhErSkZIaD tSUw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=jnk/qdRN5Uc0RkrozbodDrlQ51qHCSGXuRn8m5RVYD4=; b=WLaNrT4UcsDaVB1PNEY4QVegakahbzVwiVcX0lktOQK4+txkSQnIcdQjAZzwTbVY/d ork/ZN5vKk6BXjIF6oymaSy3AKpLLoJ71c4oxU2mlb4ex2G0VTr5aQp1SkDf6cg2MAJl HPqkWsRyH73LOXbsUnLF7jPbPqtf5bef3BdbXlHlQwey6vFT5zsVR1TIG40TCCTO4Zl2 R9V0uz6jQT513RrP5sDZDQgOLA5O3B2FM2sIzX1OEtvbgU7Pnm3fSEbY+1hs1u+MYmWT vvVjWchX9/ea8sa3RXEhmGIqhAkmmqBS3cIe58Yn2h6zYYl5JFzgMm4VueYaopnQnACp UgKA== ARC-Authentication-Results: i=1; mx.google.com; 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 j12si4035926eda.406.2019.11.08.02.54.14; Fri, 08 Nov 2019 02:54:38 -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; 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 S1731963AbfKHKxN (ORCPT + 99 others); Fri, 8 Nov 2019 05:53:13 -0500 Received: from foss.arm.com ([217.140.110.172]:40442 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727016AbfKHKxN (ORCPT ); Fri, 8 Nov 2019 05:53:13 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 72D307CD; Fri, 8 Nov 2019 02:53:12 -0800 (PST) Received: from [192.168.0.9] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 87F2D3F719; Fri, 8 Nov 2019 02:53:10 -0800 (PST) Subject: Re: [Patch v5 6/6] sched/fair: Enable tuning of decay period To: Vincent Guittot , Thara Gopinath Cc: mingo@redhat.com, peterz@infradead.org, ionela.voinescu@arm.com, 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 References: <1572979786-20361-1-git-send-email-thara.gopinath@linaro.org> <1572979786-20361-7-git-send-email-thara.gopinath@linaro.org> <20191107104901.GA472@linaro.org> From: Dietmar Eggemann Message-ID: <706278eb-1906-79f3-7a9f-6ab5080ecb63@arm.com> Date: Fri, 8 Nov 2019 11:53:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191107104901.GA472@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/11/2019 11:49, Vincent Guittot wrote: > Le Tuesday 05 Nov 2019 à 13:49:46 (-0500), Thara Gopinath a écrit : [...] >> /** >> @@ -10444,8 +10465,8 @@ void update_thermal_pressure(int cpu, unsigned long capped_capacity) >> static void trigger_thermal_pressure_average(struct rq *rq) >> { >> #ifdef CONFIG_SMP >> - update_thermal_load_avg(rq_clock_task(rq), rq, >> - per_cpu(thermal_pressure, cpu_of(rq))); >> + update_thermal_load_avg(rq_clock_task(rq) >> sched_thermal_decay_shift, >> + rq, per_cpu(thermal_pressure, cpu_of(rq))); > > Would be better to create > > +static inline u64 rq_clock_thermal(struct rq *rq) > +{ > + lockdep_assert_held(&rq->lock); > + assert_clock_updated(rq); IMHO, the asserts can be skipped here since they're already done in rq_clock_task(). > + return rq_clock_task(rq) >> sched_thermal_decay_shift; > +}