Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4230408ybx; Mon, 4 Nov 2019 09:50:22 -0800 (PST) X-Google-Smtp-Source: APXvYqwkOkDi5K0jttqAxkOozZ+BgQZTDivB3dI+arqfRKAC2/DUgiRhuTjS8szK5TefYaRry9Ny X-Received: by 2002:aa7:c358:: with SMTP id j24mr31593469edr.147.1572889822182; Mon, 04 Nov 2019 09:50:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572889822; cv=none; d=google.com; s=arc-20160816; b=0lpSwOlj0WdAN3u5UQOaaaeTOxutATJK85rDYfDVq7dSeGcrIARpVkkrP4U3ovTcYr E4vmpoT8QrNTA2WMr7wG+wS1dwoSw5kUWphCFfOrscWQazXjkPMIt7q5s8fwzR1DsVnZ 7d1unnqTFK+/eT1rmC/aBqiiuM+KtwyCXfzN9PMJRhrwvLLEVf6E/RB07zrMA7vYlz1x q/aykQJtLkOF43vb2d6mvCHa3OlxchITwvNEwUhiTUeA7TmF8nXvtsW2dMN4m+5JUvv6 2pczz4PyCIVWn/hcaRcV0NVPeWwhNpEPW6djlSCw5TS65Dg5SjwUukCjPagnxBaM5pfC UzSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=CerRZqVW5KD7h9g62jmCWoCx6bdHOPRVAdr0IAwl3q4=; b=X0NA0VGe/pl9ptIVKXuEqBsejdwjfh8yRDTuIwx0N2HrZfeaalaAIzj+WLyeiwALom JBlNUlj9RGW/WCb+pgAw+gY3NQciGPwtO+bOti/3+Ty43fM6cSlgFseHlf7qmxNpcw+O 9Ly5UcNj/f4f33qvC9BAWU7lhX52BIhLCkYpvuaEWHHY/cIA/xWXnvZPEzDhGs8FXyJF 0fcQ0FHqK3hcvuVb5mwQIA6ULPyKZehsJy3mnIQlq6M0oS8khm83fgVAhaz1cGKGVfzo xVx9u+JrZfGqfZTxHGtKHxGoZHgKR5BtxUhEvvW0tZxTCxM5PF0VNW1ucTxk17YBRSzr doiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S1XZp68j; 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 j12si7862268eda.406.2019.11.04.09.49.59; Mon, 04 Nov 2019 09:50:22 -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=S1XZp68j; 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 S1729455AbfKDRsr (ORCPT + 99 others); Mon, 4 Nov 2019 12:48:47 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:45228 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728012AbfKDRsq (ORCPT ); Mon, 4 Nov 2019 12:48:46 -0500 Received: by mail-lf1-f68.google.com with SMTP id v8so12878434lfa.12 for ; Mon, 04 Nov 2019 09:48:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CerRZqVW5KD7h9g62jmCWoCx6bdHOPRVAdr0IAwl3q4=; b=S1XZp68j+Ms0VaWxxXY2vQrcslic0wHP2t2PK+Wp3XqXu8dKiItgWxUNh9UYCWgJHW WmHMEpApUaFgvTAr5rh35Ofvs4kqzS55jCAhlPCmb+rrceUlL3Dzj54dDH41fdA2uQrf yGTHyWv5QlxJBnXQji5LhihyLNWQclUizI+8A9Zuu4XS15bFaYxMZC1FMYMCnwcZ3n7Q iPZVo/dahHCXQK1OEz6H1ERxppSBbGh6e1kxNz0hEKnWOE42P24kXk4nbk1JE97iWPkY v2bai5G9Y+MIrOzTOv7KVQYikbOUCJ3tOcism5JK/OekL8C6fnG2Q5Udo4ID9imcClin 8JIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CerRZqVW5KD7h9g62jmCWoCx6bdHOPRVAdr0IAwl3q4=; b=IlNzhnCGQDJNrzHdSWxCvnKwokJTNSko42OdHIO9vdI/dDaSLE00YiqBe/6KK7Kk13 PSJdY4eL08WcE3ggOZpyLQ/xBFeeT6ve41EHEde9CaF4j0ITrXG+nG44L+08xhomqfaE 8la0mtKMFcRpI9QCz4d+1saA2jwK00H3uXm9Skx07ZtYEKW3EgjX8lTGuUTKovqi8CUO nAsvlQ5eX0wnP0yVEW2I4g9CMDEIqzbvdKlx3JikKTmm2FzTd96PvyTdnU7Y2p5Xv1yd 6wK6V6UN6wrTKeJPJPqwrYWcGT/YuIXmm0KeYQBgx28WeW7TABLAH6kyiZn9QDZLwaWf pVfA== X-Gm-Message-State: APjAAAXDmaDsBcbhPByiEz23YP52A7cPaIf/fQkz86kdrT3WOs9PP3tS ss9VsImZmIt2T13l93Vy9f6n5lAyimMPK/UbneUi1w== X-Received: by 2002:ac2:48af:: with SMTP id u15mr17204731lfg.151.1572889724743; Mon, 04 Nov 2019 09:48:44 -0800 (PST) MIME-Version: 1.0 References: <1571776465-29763-1-git-send-email-thara.gopinath@linaro.org> <1571776465-29763-3-git-send-email-thara.gopinath@linaro.org> <379d23e5-79a5-9d90-0fb6-125d9be85e99@arm.com> <5DBC9C57.3040504@linaro.org> In-Reply-To: From: Vincent Guittot Date: Mon, 4 Nov 2019 18:48:32 +0100 Message-ID: Subject: Re: [Patch v4 2/6] sched: Add infrastructure to store and update instantaneous thermal pressure To: Dietmar Eggemann Cc: Thara Gopinath , Ingo Molnar , Peter Zijlstra , Ionela Voinescu , Zhang Rui , Eduardo Valentin , Quentin Perret , linux-kernel , Amit Kachhap , Javi Merino , Daniel Lezcano Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 4 Nov 2019 at 18:42, Dietmar Eggemann wrote: > > On 04/11/2019 18:34, Vincent Guittot wrote: > > On Mon, 4 Nov 2019 at 18:29, Dietmar Eggemann wrote: > >> > >> On 01/11/2019 21:57, Thara Gopinath wrote: > >>> On 11/01/2019 08:17 AM, Dietmar Eggemann wrote: > >>>> On 22.10.19 22:34, Thara Gopinath wrote: > > [...] > > >>> You still need now.All the update_*_avg apis take now as a parameter. > >> > >> You do need it for the ___update_load_sum() call inside the > >> foo_load_avg() functions. But that doesn't mean you have to pass it into > >> foo_load_avg(). Look at update_irq_load_avg() for example. We don't pass > >> rq->clock as now in there. > > > > update_irq_load_avg is the exception but having now as a parameter is > > the default behavior that update_thermal_load_avg have to follow > > Why would this be? Just so the functions have the the same parameters? That's the default behavior to keep all pelt function to behave similarly and keep outside what is not strictly related to pelt so it will ease any further modification sched_thermal_decay_coeff is not a pelt parameter but a thermal one irq_avg is an exception not the default behavior to follow > > In this case you could argue that update_irq_load_avg() has to pass in > rq->clock as now. > > >> -int update_thermal_load_avg(u64 now, struct rq *rq, u64 capacity) > >> +extern int sched_thermal_decay_coeff; > >> + > >> +int update_thermal_load_avg(struct rq *rq, u64 capacity) > >> { > >> + u64 now = rq_clock_task(rq) >> sched_thermal_decay_coeff; > >> + > >> if (___update_load_sum(now, &rq->avg_thermal, > >> capacity, > >> capacity,