Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2849112pxj; Mon, 14 Jun 2021 08:31:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKGS2/4ewjdPGmgRY43DYqkQt5KJTuMlFimM4U/NS0vS2wz4MOcOQPCm3UPZb+M53Td9OK X-Received: by 2002:a17:907:1003:: with SMTP id ox3mr16015833ejb.469.1623684691798; Mon, 14 Jun 2021 08:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623684691; cv=none; d=google.com; s=arc-20160816; b=HPSAKKeWJ5duOeqXuv6Qg3Oi0O/acwFQ3EVjpyquRf7Qgk3JZwq8XNXch83Ax9hLMP QJ+Z3H7woSEEjYua+H6P6hYvNzK0kpWetGFdt6Xm2c9bdWb8VvP+WeXI+vTq+amp0ucg rPseIaHFpagqLcXccqlBp3qKYbxZocwNdkhlrOUerGTgX8+8fkc1dsnCf1Mo6QAp2cxQ u7fh04bX7eqLjjZ6qsIp+esSJB3JBbcZz9yT2Us3kX7pvNn8ixG3gNz/aLMfsj9Aq/NZ rk99Uxq0vE0nL2188t0XGbbuDX6FM29Ts77xchpEHh/ZKVv1uBulPoE5M+FdviR/GRi6 4Bfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=DuMAWHAXAB6GP7WhgBc957jJtZ/jKjFNh/uaS4qEEpM=; b=xI5FIXnX7CwNp3m6EcXSLnZj+eVkfQXXDvwpkKi0OlaJ/KkKAQQGUWfMHi2WkH2+Kz rxw+lkWbN4ad+OzdigSJbGgXlxJvBZkm060NRPjZpMDaZF0al2aUzeo200uD0PK+CUcm uL/Lu+Uil/1+8u+2KMYzeFhwgxD57JF9aTZxWKJph0vOGyTwUrF1IjAfEv65QaWeSby2 EobY5V6AF1WigiNTL3WrBMowxdM9k/yqkLpPv1hlo3N94yvwTWr3M6y8J6RTnW+fmYau 2ST3G7EfSYMzmGXXgDah0Qne3l6/uYJ/1RH2uIuzoH70GUmc8+ufBh83Cck+ilFEUJ8s LPKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b24si11278063edt.82.2021.06.14.08.31.09; Mon, 14 Jun 2021 08:31:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233725AbhFNPcB (ORCPT + 99 others); Mon, 14 Jun 2021 11:32:01 -0400 Received: from foss.arm.com ([217.140.110.172]:38876 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233859AbhFNPb2 (ORCPT ); Mon, 14 Jun 2021 11:31:28 -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 655CB1FB; Mon, 14 Jun 2021 08:29:25 -0700 (PDT) Received: from [10.57.5.127] (unknown [10.57.5.127]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EA6043F70D; Mon, 14 Jun 2021 08:29:21 -0700 (PDT) Subject: Re: [PATCH v3 2/3] sched/fair: Take thermal pressure into account while estimating energy To: vincent.guittot@linaro.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, peterz@infradead.org, rjw@rjwysocki.net, viresh.kumar@linaro.org, qperret@google.com, dietmar.eggemann@arm.com, vincent.donnefort@arm.com, Beata.Michalska@arm.com, mingo@redhat.com, juri.lelli@redhat.com, rostedt@goodmis.org, segall@google.com, mgorman@suse.de, bristot@redhat.com, thara.gopinath@linaro.org, amit.kachhap@gmail.com, amitk@kernel.org, rui.zhang@intel.com, daniel.lezcano@linaro.org References: <20210610150324.22919-1-lukasz.luba@arm.com> <20210610150324.22919-3-lukasz.luba@arm.com> From: Lukasz Luba Message-ID: <81d7bd73-a61a-5501-f8ec-77e195355013@arm.com> Date: Mon, 14 Jun 2021 16:29:20 +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: <20210610150324.22919-3-lukasz.luba@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vincent, Gentle ping. Could you have a look at this implementation, please? On 6/10/21 4:03 PM, Lukasz Luba wrote: [snip] > @@ -6527,8 +6527,12 @@ compute_energy(struct task_struct *p, int dst_cpu, struct perf_domain *pd) > struct cpumask *pd_mask = perf_domain_span(pd); > unsigned long cpu_cap = arch_scale_cpu_capacity(cpumask_first(pd_mask)); > unsigned long max_util = 0, sum_util = 0; > + unsigned long _cpu_cap, thermal_pressure; > int cpu; > > + thermal_pressure = arch_scale_thermal_pressure(cpumask_first(pd_mask)); > + _cpu_cap = cpu_cap - thermal_pressure; I've done the implementation according to your suggestion. That should provide the consistent usage. Regards, Lukasz