Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4224543ybx; Mon, 4 Nov 2019 09:44:33 -0800 (PST) X-Google-Smtp-Source: APXvYqyP0SN2XJBn+AWfYVWUQYUkypFAmfjVQMjLNM7xOqs8PhJLVmXNpNQ1KZnCBAipzNNfWfvW X-Received: by 2002:a50:890c:: with SMTP id e12mr31339259ede.277.1572889473617; Mon, 04 Nov 2019 09:44:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572889473; cv=none; d=google.com; s=arc-20160816; b=VlJaUizQ2cdiMxeZaBPXW30PwHZIJcmxVWlxPHFo743NeftWrDazZnrEFJAlV/UhWL fa4H2C3RP+jocT3zXwPWpVdEXYoUm0zGai+DrYpakIjUFPQK5pgQmHN/FlUsZEsgeKx/ cPcj3cEWNjAeHczwfa9QAw3R8FCBJGHFnnLNhEzt2tsK9PYxK6H8c1OrGSjGHqdvpl2T tHWktKOSpsUgC16RIMFlrWMRP0LpFPwEHpdYhskzEQl+aNHSA5JJW+hljdZ8jAZCNF6t EAkGASeS1O0bVVhv7cw3z1fJqwKz3B0U2rKx/C7HsIEDfguAS8+SjHXQpf28jyb/VatA na2w== 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=GGzpQdjps3ooSIfJfTDXfkY1pPeV3/mGapPI5qF71nc=; b=RbS2Mi6dl2YJk6Cti8enGsXXBJ8uqT7c7C1pxe0zGRvxc0YyY5ugjkiLZKJGUY6w+G 8oHo6R4GXxafFXelyH5IJEnPuMrAE5D5FRPk8sFltQsfkfxjZvuUduWsAzPYW4uw0M39 /JVaLbjJwZmuAdnD1hjhlcKgQeTloxLlyWYJ5gIT68ZZjESyzYNjOTPXftshym+1veXW kT8IizcMKJENrRP7vF8TtazMjiK9R5meccVE2o3siZ6uVweeZ30MI+oD32BBCm8IKx1M x5pEiNZvlEFN8Slcc++xP3pYD2xatU6C4wSBwKe0/EO7E7ofzRJodcCtmotX44B7tIBd 9aWA== 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 u4si9159526edi.179.2019.11.04.09.44.10; Mon, 04 Nov 2019 09:44:33 -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 S1729459AbfKDRmG (ORCPT + 99 others); Mon, 4 Nov 2019 12:42:06 -0500 Received: from foss.arm.com ([217.140.110.172]:48194 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728287AbfKDRmC (ORCPT ); Mon, 4 Nov 2019 12:42:02 -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 B0C401F1; Mon, 4 Nov 2019 09:42:01 -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 D262B3F71A; Mon, 4 Nov 2019 09:41:59 -0800 (PST) Subject: Re: [Patch v4 2/6] sched: Add infrastructure to store and update instantaneous thermal pressure To: Vincent Guittot Cc: Thara Gopinath , Ingo Molnar , Peter Zijlstra , Ionela Voinescu , Zhang Rui , Eduardo Valentin , Quentin Perret , linux-kernel , Amit Kachhap , Javi Merino , Daniel Lezcano 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> From: Dietmar Eggemann Message-ID: Date: Mon, 4 Nov 2019 18:41:50 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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,