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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 DF249C433DB for ; Tue, 23 Feb 2021 14:46:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EDB164E58 for ; Tue, 23 Feb 2021 14:46:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231742AbhBWOqQ (ORCPT ); Tue, 23 Feb 2021 09:46:16 -0500 Received: from foss.arm.com ([217.140.110.172]:53718 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbhBWOqO (ORCPT ); Tue, 23 Feb 2021 09:46:14 -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 AEE181FB; Tue, 23 Feb 2021 06:45:28 -0800 (PST) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EE3AB3F73B; Tue, 23 Feb 2021 06:45:26 -0800 (PST) Subject: Re: [PATCH] sched/fair: Fix task utilization accountability in cpu_util_next() To: vincent.donnefort@arm.com, peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org Cc: linux-kernel@vger.kernel.org, qperret@google.com, patrick.bellasi@matbug.net, valentin.schneider@arm.com References: <20210222095401.37158-1-vincent.donnefort@arm.com> From: Dietmar Eggemann Message-ID: <66a16cf1-ffc5-2a40-7e04-900cc0e2ee2c@arm.com> Date: Tue, 23 Feb 2021 15:44:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210222095401.37158-1-vincent.donnefort@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/02/2021 10:54, vincent.donnefort@arm.com wrote: > From: Vincent Donnefort [...] > Also, replace sub_positive with lsub_positive which saves one explicit > load-store. IMHO, in case you're going to fix this now in compute_energy(), this optimization could still be done. Maybe in an extra patch? cpu_util_without() is using lsub_positive() to remove task util from cpu util as well. [...]