From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22D2EC48BE6 for ; Mon, 14 Jun 2021 18:22:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 00EDA613B3 for ; Mon, 14 Jun 2021 18:22:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235428AbhFNSYN (ORCPT ); Mon, 14 Jun 2021 14:24:13 -0400 Received: from foss.arm.com ([217.140.110.172]:43392 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235298AbhFNSYL (ORCPT ); Mon, 14 Jun 2021 14:24:11 -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 7DE3D113E; Mon, 14 Jun 2021 11:22:07 -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 EE6433F694; Mon, 14 Jun 2021 11:22:03 -0700 (PDT) Subject: Re: [PATCH v3 2/3] sched/fair: Take thermal pressure into account while estimating energy To: Vincent Guittot Cc: linux-kernel , "open list:THERMAL" , Peter Zijlstra , "Rafael J. Wysocki" , Viresh Kumar , Quentin Perret , Dietmar Eggemann , Vincent Donnefort , Beata Michalska , Ingo Molnar , Juri Lelli , Steven Rostedt , segall@google.com, Mel Gorman , Daniel Bristot de Oliveira , Thara Gopinath , Amit Kachhap , amitk@kernel.org, Zhang Rui , Daniel Lezcano References: <20210610150324.22919-1-lukasz.luba@arm.com> <20210610150324.22919-3-lukasz.luba@arm.com> From: Lukasz Luba Message-ID: <2fa70564-e02a-06d5-2742-24dedccddea2@arm.com> Date: Mon, 14 Jun 2021 19:22:01 +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; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/14/21 5:03 PM, Vincent Guittot wrote: > On Thu, 10 Jun 2021 at 17:03, Lukasz Luba wrote: [snip] >> In the existing code the raw value of arch_scale_cpu_capacity() is used >> for clamping the returned CPU utilization from effective_cpu_util(). >> This patch fixes issue with too big single CPU utilization, by introducing >> clamping to the allowed CPU capacity. The allowed CPU capacity is a CPU >> capacity reduced by thermal pressure signal. We rely on this load avg > > you don't rely on load avg value but on raw thermal pressure value now Good catch, I'll change that description. > >> geometric series in similar way as other mechanisms in the scheduler. >> [snip] >> >> + thermal_pressure = arch_scale_thermal_pressure(cpumask_first(pd_mask)); > > Do you really need to use this intermediate variable thermal_pressure > ? Seems to be used only below True, it's used only here. I'll remove this variable in the v4. > > With these 2 comments above fixed, > > Reviewed-by: Vincent Guittot Thank you for the review! Regards, Lukasz