Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9135988ybl; Fri, 17 Jan 2020 06:57:07 -0800 (PST) X-Google-Smtp-Source: APXvYqyFWzYfCJAgAvVYDiWSR4Y73vpqZ9QC76jalQzpO1lfBJ9TsFp0a8VN9vo9Ue1veS2Yzs+2 X-Received: by 2002:aca:b943:: with SMTP id j64mr3741073oif.155.1579273027523; Fri, 17 Jan 2020 06:57:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579273027; cv=none; d=google.com; s=arc-20160816; b=WopYw11lc5DupuEmR9jwfT+FLHyQ+XUzyb+jmRXMyyqsxX5Pmxb4eH8e1+gkVR6QGi qBxqZMOKH0l0siWXKT+E8SP4wO9DdvWCZQqEA8nJTpkTMhbP0JCC/mAFuLjA0mgJui/6 p7Sw0zk+YHYWX0REgj7PtSbrxb1wrvoFOEPLw+0eLuJZatgJ37PtCkz6eqnnmjnhFFnk +mbBvWNC81KNST+mrbiZ00fNTr2QkFPdnC+MHV1zFEIuWhjAO6L83pkec8shTXG70op+ bq04oyxzk+6SADf2a2AC38NwrPXrnVVPtDCCfuuUjgme6JiHWgiO3tZaJ6w09B2JWVQ8 KMzg== 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=7zwwz+4wo1PNFwWKmp+ufp43NtNubm/NKjA95ifXVlQ=; b=NwaIcYbH455J96l2zqfxg2RVPCwsBKSRSVsHlmM4uIHWI1tdVKv3RYSTdiaCXSlfqw mW0bI181xf1+V6ENVWvRsCJRr4rEYsuc2KRDGCMQEoeumJfB5HsbUYICA2hU4kjiPy0I WMmb5+EpW806wEdHGnGd6Car1MVJAwLlAcZGLVdSJNouVTp6yN770J7dzdFl6as7CzoZ elz29WCyYlnaX29L3ko5J/zv4NkqbSC51ysS9z3dQR/oWTxWCTWHDdYxBpqSUQADDnBJ wAOR/ewV/q++jZWhqk8psBjklpykvlmJBTlGVJAYrA7FJo1G3cz0S4bc+UjdyUJg3f8n sDOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="OgEpF7a/"; 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 g5si15216472otn.232.2020.01.17.06.56.53; Fri, 17 Jan 2020 06:57:07 -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=bombadil.20170209 header.b="OgEpF7a/"; 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 S1728794AbgAQOzz (ORCPT + 99 others); Fri, 17 Jan 2020 09:55:55 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:59418 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726827AbgAQOzz (ORCPT ); Fri, 17 Jan 2020 09:55:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=7zwwz+4wo1PNFwWKmp+ufp43NtNubm/NKjA95ifXVlQ=; b=OgEpF7a/jjp2RTq8C8AAVnfZS Tmvovj94SbG0K/2Wrla/d7NgHkPl4ZJOo2+vM3DqZvl4akfN2BTyG4QL14mq2NC9SEt/H/W469UKZ wgjNldxUStW0ejemU6aUHubBY848wTI+H/7WRP55tURybaKpdWvsH7mmQwEWDTudh1Y608M9zWVR4 kh7me8dpa8KGtanYKKrqU21YrFD4rxgJ3VK5SLzetkJSW3lDQBMlqNo1v9gXl4hzfPZ2PQ/q3Fwdz JUU+o6H0kg1ZhIszm3YHagdclKuIANQy8b7Ar9cwqHPkCdrYQ2Y8AdCWMv9N7CT9Hx42yeL53qIiH zGSgANIaQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1isT2J-0000gl-7L; Fri, 17 Jan 2020 14:55:47 +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 BFBB3300F4B; Fri, 17 Jan 2020 15:54:07 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 065B32020D8FC; Fri, 17 Jan 2020 15:55:45 +0100 (CET) Date: Fri, 17 Jan 2020 15:55:44 +0100 From: Peter Zijlstra To: Vincent Guittot Cc: Thara Gopinath , Ingo Molnar , Ionela Voinescu , Dietmar Eggemann , Zhang Rui , Quentin Perret , Daniel Lezcano , viresh kumar , linux-kernel , Amit Kachhap , Javi Merino , Amit Kucheria Subject: Re: [Patch v8 4/7] sched/fair: Enable periodic update of average thermal pressure Message-ID: <20200117145544.GE14879@hirez.programming.kicks-ass.net> References: <1579031859-18692-1-git-send-email-thara.gopinath@linaro.org> <1579031859-18692-5-git-send-email-thara.gopinath@linaro.org> <20200116151502.GQ2827@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Fri, Jan 17, 2020 at 02:22:51PM +0100, Vincent Guittot wrote: > On Thu, 16 Jan 2020 at 16:15, Peter Zijlstra wrote: > > > > That there indentation trainwreck is a reason to rename the function. > > > > decayed = update_rt_rq_load_avg(now, rq, curr_class == &rt_sched_class) | > > update_dl_rq_load_avg(now, rq, curr_class == &dl_sched_class) | > > update_thermal_load_avg(rq_clock_task(rq), rq, thermal_pressure) | > > update_irq_load_avg(rq, 0); > > > > Is much better. > > > > But now that you made me look at that, I noticed it's using a different > > clock -- it is _NOT_ using now/rq_clock_pelt(), which means it'll not be > > in sync with the other averages. > > > > Is there a good reason for that? > > We don't need to apply frequency and cpu capacity invariance on the > thermal capping signal which is what rq_clock_pelt does Hmm, I suppose that is true, and that really could've done with a comment. Now clock_pelt is sort-of in sync with clock_task, but won't it still give weird artifacts by having it on a slightly different basis? Anyway, looking at this, would it make sense to remove the @now argument from update_*_load_avg()? All those functions already take @rq, and rq_clock_*() are fairly trivial inlines.