Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp122141pxy; Fri, 30 Apr 2021 01:37:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/N39EQItNHw5nZu6bMyM6tuFL1Hm/5qMNDgFPXZfxqBxyb6nRjzzfaIrqny3e1wAXThCX X-Received: by 2002:a05:6402:40d6:: with SMTP id z22mr4371458edb.275.1619771821669; Fri, 30 Apr 2021 01:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619771821; cv=none; d=google.com; s=arc-20160816; b=MS+eBLgtox3fwu6Nv/HfkSp84wK+KTOUG2Q1YhoB01rkgPQHjCoOvN7LNMEwEmHCxz On9oA3PyFnZi43BvkoE03GpB8QEiRAYL4CmEoOqC8rk4qrw+FrAEHFcA/qwlCX9mY/yf oLM9xl8YCxni1wknYEqeE1abegLwZjz9lRbzVLKwq+IWb5ujtjwySrWaqE9pxHC1l2o5 Tp3PHjrDj1UROsECHuqhFy0ePbYOpVnYkEGKvkd4eM0nTU3CQ6zh4QMJvceaOmYkg2Mc e5jIls+MnjXOzHsUbEz5HylPpOLzcbR7zwlzDekBl1mt4jSYjJ/o0ovvvDyUnYb26U8S GuNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=5jGkO0+w8WKZYkAdGLO+sIz3iLRXJt+XcF9/+uV3IvY=; b=Qi/GfspGScXX0jXQa7nYw7XavTtK1ybzexR0LGhm0WMLnw9JQtCIP3BvSfS/5W3mnj atgib9NVV7yyBOcKRgbjxgxHi02cSfr38+8cc8xMhTKTG9yG0VSHKBFrAArix53fYnhj 0WfFe4p0VtVro+CbLhd7uUqKm/5s1wUYTX0GbCRioZdD1YxGAO7Z0g/h3mfOVEolAaAE hPEtAPEkEyhEIWu7FBBQvwo3a0HwOBLmmQX9kRnxJTQRS1jvhBw1X00ToXQzPAcch/co S/1onWSFLivxgUPh6XcCMkQ3LnxGvvh955H77JbBiRnvxiDHYHPmwfMcMtMJYbUk05GO 41zw== 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 cc22si542101edb.389.2021.04.30.01.36.38; Fri, 30 Apr 2021 01:37:01 -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 S230407AbhD3Ieb (ORCPT + 99 others); Fri, 30 Apr 2021 04:34:31 -0400 Received: from foss.arm.com ([217.140.110.172]:43600 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbhD3Iea (ORCPT ); Fri, 30 Apr 2021 04:34:30 -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 43327ED1; Fri, 30 Apr 2021 01:33:42 -0700 (PDT) Received: from [10.57.32.47] (unknown [10.57.32.47]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 865383F70D; Fri, 30 Apr 2021 01:33:38 -0700 (PDT) Subject: Re: [PATCH] sched/fair: Fix negative energy delta in find_energy_efficient_cpu() To: Quentin Perret Cc: linux-kernel@vger.kernel.org, xuewen.yan@unisoc.com, Lukasz.Luba@arm.com, Vincent.Donnefort@arm.com, dietmar.eggemann@arm.com, qais.yousef@arm.com, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, qperret@qperret.net References: <20210420125604.15796-1-Pierre.Gondois@arm.com> From: Pierre Gondois Message-ID: Date: Fri, 30 Apr 2021 09:33:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Quentin, I sent a v2 yesterday. This is just to answer your question: > Not that I disagree with the approach, just being curious: do we know > how much this is helping in practice to reduce the window by moving the > compute_energy() calls down here? I don't have any numbers. However, moving the computation of base_energy_pd after looping over the CPUs of a performance domain allows to skip this computation if no CPU is available in the performance domain. This should justify moving the compute_energy() call. Regards, Pierre