Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7892558ybl; Thu, 16 Jan 2020 07:19:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwhwl5mA19fkJqRajV/J89fSTFlRzSVFVAKcIu870pwW2nwfAilpU8wyHUI71P/MkZ8ffZj X-Received: by 2002:a9d:4805:: with SMTP id c5mr2439740otf.292.1579187945543; Thu, 16 Jan 2020 07:19:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579187945; cv=none; d=google.com; s=arc-20160816; b=FT/qlbQDaAu17HBSze+9DI9KJHGpbiB892I+f/1GDLcg7J6RwChuAAcD2vMa+psHZO w3qX4TRpXiMlqYZP4iTb5nII6BA4nDJLRlZQD+4E6tkS4vsJdVy93NuRUUq4tt0Ptb6l hxFEipxYXKVWb9KaRj6JJTthv6I3utaiKFD1gnLOF0ufqSPa6RGTppaDLhDAcf8kdZ7P S+iHzVuwyOZeRM3410SjwNcN6024AR5pCvoec1tUaK2dy9WDylf1q4STaUQc5c4MbiRz s5vOt4Fh+nz6n/qudnm0ANnb2m0119SYy2yFz/Ud+5ZP08chyAAObqTN+Ice+OrEyQrr KXKA== 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=borVowV1cTfT1Ds6iFHszucOgRgPJsUu96PbUDyKtzw=; b=czhxQCqGbJJlZxSpk62sW61wogAPyt7CCpLP6AgPB/56M/MAFLyq6O8fVpMVBG5KNo l95jlEIvQiEYKYgdlmtO1ohT+3F3MWKno9GAjauWPA556Qsba36puxALzt5ZdYES6fz7 d752/j2pxnWPFQdOY1UPONHlnnB5enKJ//El5dkFacGSw7h6GpbAaTbCGw90SsM06ypq 5dMeckyKSqEAbtLvEzkurcYQFLMadD7cut5SF0LKjzNxopt0VFhDZmb3kgPDgb8TS4Z2 CPk/ytkROce89l/RhbL2BdVr2qpHEGL2nlZ0Wk50SboPzck650zjR2yZjIdlEsSo/K8s fSUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=THuV5dJn; 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 w7si13035132otq.250.2020.01.16.07.18.50; Thu, 16 Jan 2020 07:19:05 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=THuV5dJn; 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 S1726706AbgAPPRe (ORCPT + 99 others); Thu, 16 Jan 2020 10:17:34 -0500 Received: from merlin.infradead.org ([205.233.59.134]:34698 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbgAPPRe (ORCPT ); Thu, 16 Jan 2020 10:17:34 -0500 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=borVowV1cTfT1Ds6iFHszucOgRgPJsUu96PbUDyKtzw=; b=THuV5dJnG+L84E0iB2cJDSRI0 K/IzT69KLzN3lqfvhI3zS2KW8i/rTYkBS1gBdXzHBcUXcD/Fb2sAFx5uCNs/Bk16VbIQ90QPYzNN5 Db0W+VI3xn8QnumXsPA7xLEtowY9EK7UZ7z7J3DoFGqiw1ZoNfUPk6I0eAgPbTiiJ6RdLB2Iif+lG EVF4f0Hyx2SaxbhExNNM7LTMHcSrYmeBBak6l64EQv2y9di/IMF2vHcunGIFkBj1GbD0miKOHJ3kq u4wua+wd7teUuxD/v2Dgdf6jUShuqtMU2688MSTMIWd7hQqRgUY8BYdsQ0MdlFB1pvi4Pdsyy4znc QhAe+O//g==; 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 1is6th-0003dB-Ua; Thu, 16 Jan 2020 15:17:26 +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 D2B56302524; Thu, 16 Jan 2020 16:15:47 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A28EC2B6D1E15; Thu, 16 Jan 2020 16:17:24 +0100 (CET) Date: Thu, 16 Jan 2020 16:17:24 +0100 From: Peter Zijlstra To: Thara Gopinath Cc: mingo@redhat.com, ionela.voinescu@arm.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rui.zhang@intel.com, qperret@google.com, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, amit.kachhap@gmail.com, javi.merino@kernel.org, amit.kucheria@verdurent.com Subject: Re: [Patch v8 1/7] sched/pelt: Add support to track thermal pressure Message-ID: <20200116151724.GR2827@hirez.programming.kicks-ass.net> References: <1579031859-18692-1-git-send-email-thara.gopinath@linaro.org> <1579031859-18692-2-git-send-email-thara.gopinath@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1579031859-18692-2-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, Jan 14, 2020 at 02:57:33PM -0500, Thara Gopinath wrote: > diff --git a/kernel/sched/pelt.h b/kernel/sched/pelt.h > index afff644..bf1e17b 100644 > --- a/kernel/sched/pelt.h > +++ b/kernel/sched/pelt.h > @@ -7,6 +7,16 @@ int __update_load_avg_cfs_rq(u64 now, struct cfs_rq *cfs_rq); > int update_rt_rq_load_avg(u64 now, struct rq *rq, int running); > int update_dl_rq_load_avg(u64 now, struct rq *rq, int running); > > +#ifdef CONFIG_HAVE_SCHED_THERMAL_PRESSURE > +int update_thermal_load_avg(u64 now, struct rq *rq, u64 capacity); static inline u64 thermal_load_avg(struct rq *rq) { return READ_ONCE(rq->avg_thermal.load_avg); } > +#else > +static inline int > +update_thermal_load_avg(u64 now, struct rq *rq, u64 capacity) > +{ > + return 0; > +} static inline u64 thermal_load_avg(struct rq *rq) { return 0; } > +#endif Would help with patch 4 and 5.