Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2653768pxb; Tue, 23 Feb 2021 12:05:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxMxXBqhn5EXIRDn4GfBDRlauUJWS5yptZCQ2NnHCesd7LDYhMCbCTGioMp2bAlo1vmKox X-Received: by 2002:a17:906:f288:: with SMTP id gu8mr28106086ejb.512.1614110713399; Tue, 23 Feb 2021 12:05:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614110713; cv=none; d=google.com; s=arc-20160816; b=B/df9WsDFjPItHSNyno1WQugOLbwm8OjpycK6MpEzRHAGCGF4pOhbHSJyrEYp//Y7q R08cYqSmLeCcW5pF4WkbXtstCx1kdB7PeF3Bg4PJE4Yn9XEuPzbXz5VaURw6VQuRHQdg CAVPPhwqlmcxg0gWUCDKcJCt5URIBZKVUNtIdG0/xFKGSYgrKq/ErCTnRAaALn2mAi4U 2dzxAs3tP8F2GuKO8xAcgUOOSJ1wmtwQs0N96/MZw6KEUvhg3tPRdKjMgeb7EOIF77d8 cNYA6Kuq28FYbkfFUjM9v/wqb/vhuRejSrfKE/aU4vvx1Zq9nsOdyaPdg5zUZEzpsQsC 5QEA== 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=zQj0a8bmlKnvGuBXxvgYBHZAGWvD5M7RfaGXBlIwT1w=; b=Qt/JgzAWrgbZWKze/W8dm+oTisPnaOk7GP2WcwCo4NTFCvi2+4RGxfc333tDTXrKLz 8gtnt+hThPOv8I5OCKKlkI/auSIyG+Qc48rXQjEIvzmlnOWg9n4VdCo0sLuK4JaJx2Zc yujz3B2jG4ohrfyazg692kMO1BUwmQXReX524WWIbW3PlGEmQMvg+3SvW2ZsCoFvZGZ8 SaYIDDbOWMecRWg/+SvEzzNOwZi/ZJ9Ta0dkPduLdxLn2T/vcUN7BC8xqvkgMVexZPfZ 6JNEgFosd8jqA4+JI9/PlaAFQPsf9IbAOGm7e6dX4Qnq9ZXIFEO5oatAQ+cCj1r6zHvI MSsA== 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 r20si4115424ejd.746.2021.02.23.12.04.43; Tue, 23 Feb 2021 12:05:13 -0800 (PST) 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 S231478AbhBWOqO (ORCPT + 99 others); Tue, 23 Feb 2021 09:46:14 -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. [...]