Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1381720ybx; Thu, 31 Oct 2019 09:46:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNrt6EH0K2z8I46e6e7NY5FbT++sNLHvLYH7A9TMidkr5niRSwFzztF/HMdS1e3JGqwfR3 X-Received: by 2002:aa7:c757:: with SMTP id c23mr7080524eds.209.1572540387905; Thu, 31 Oct 2019 09:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572540387; cv=none; d=google.com; s=arc-20160816; b=W7l7ETfgQ8r7+Ih6QeyIU8e22VfK9gXnZH//S7o/9adRgQuN4UnjZLF8n2+beouocl EzA3I3Nqarz7Y8YA93oI6+Bwj0KUIAn+JP9W5OZqJ9CB7b+C2R98zrZ7aD2yc9rcNDdB OzalrIaux1uRdwP7zfEPpHaZrjE9/kgQ4I5x+Pc5AzOa9EBW5BvBMW/bOhVY2QUC2kJJ I+Z7WU/4+aInXYGC3WICxXwJYYXAwp5CBsaPyxnt+WI5SNP+UsyaTJBQimA5t8Gia6ZK GGI9P/ZO9VUiyTmFbuPknI/cqBiO2gKArFeVnzisqwdH0QOfHtucCt740iOw8mCIGXza iG7g== 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=Dspg/VQbhihpI4fPdydVlMNGnOkmyJTiRdfAfYvHj9Q=; b=ux27o+HEKbfHZORVEhYVjM/E1SZLXpynmZp5L4QHne4pmZYoH5JdhMsxdDSwcAKpAE s/m8/55MywOkUgQugLGG5NPoO3LyPaVOuKp50421mKjV+tZGmby4bVIxxQyc8lAT6Aq0 DfKid4/kQlHfodunj/20s1Ew+IXdwGLe8/4LQmYpHEJCEo6bwBPXDNwCL+Skl6CssLJL N2ccW/Gcl+Bz4k01KQy7jD8R7lR0BneXVrqbcx4XUFcRbjd/dwY+4J8SAaxPGPWzGrW9 6KURnvvmS2tTDXbVkE+Y4hkoy5/R0AJqyqiJ11RSYos3IxDdDWzH77KUe/jt4wub1hXV i8lQ== 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 x21si4369166eda.366.2019.10.31.09.46.04; Thu, 31 Oct 2019 09:46:27 -0700 (PDT) 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 S1728628AbfJaQos (ORCPT + 99 others); Thu, 31 Oct 2019 12:44:48 -0400 Received: from foss.arm.com ([217.140.110.172]:51810 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727715AbfJaQos (ORCPT ); Thu, 31 Oct 2019 12:44:48 -0400 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 96B361FB; Thu, 31 Oct 2019 09:44:47 -0700 (PDT) Received: from [192.168.1.20] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 834F03F6C4; Thu, 31 Oct 2019 09:44:45 -0700 (PDT) Subject: Re: [Patch v4 4/6] sched/fair: update cpu_capcity to reflect thermal pressure To: Vincent Guittot Cc: Qais Yousef , Peter Zijlstra , Thara Gopinath , Ingo Molnar , 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-5-git-send-email-thara.gopinath@linaro.org> <20191023122252.dz7obopab6iizy4s@e107158-lin.cambridge.arm.com> <20191028153010.GE4097@hirez.programming.kicks-ass.net> <20191031105342.b3sl5xhysldfla3g@e107158-lin.cambridge.arm.com> From: Dietmar Eggemann Message-ID: Date: Thu, 31 Oct 2019 17:44:44 +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 31.10.19 17:31, Vincent Guittot wrote: > On Thu, 31 Oct 2019 at 17:17, Dietmar Eggemann wrote: >> >> On 31.10.19 16:48, Vincent Guittot wrote: >>> On Thu, 31 Oct 2019 at 16:38, Dietmar Eggemann wrote: >>>> >>>> On 31.10.19 11:53, Qais Yousef wrote: >>>>> On 10/28/19 16:30, Peter Zijlstra wrote: >>>>>> On Wed, Oct 23, 2019 at 01:28:40PM +0100, Qais Yousef wrote: >>>>>>> On 10/22/19 16:34, Thara Gopinath wrote: [...] >>>> diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c >>>> index 38210691c615..d3035457483f 100644 >>>> --- a/kernel/sched/pelt.c >>>> +++ b/kernel/sched/pelt.c >>>> @@ -357,9 +357,9 @@ int update_thermal_load_avg(u64 now, struct rq *rq, >>>> u64 capacity) >>>> { >>>> if (___update_load_sum(now, &rq->avg_thermal, >>>> capacity, >>>> - capacity, >>>> - capacity)) { >>>> - ___update_load_avg(&rq->avg_thermal, 1, 1); >>>> + 0, >>>> + 0)) { >>>> + ___update_load_avg(&rq->avg_thermal, 1, 0); >>>> return 1; >>>> } >> >> So we could call it this way since we don't care about runnable_load or >> util? > > one way or the other is quite similar but the current solution is > aligned with other irq, rt, dl signals which duplicates the same state > in each fields I see. But there is a subtle difference. For irq, rt, dl, we have to also set load (even we only use util) because of: ___update_load_sum() { ... if (!load) runnable = running = 0; ... } which is there for se's only. I like self-explanatory code but I agree in this case it's not obvious.