Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1322332lkv; Thu, 29 Apr 2021 03:22:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynJLcqctI5qcys/CCENUDJrD55BQdkKfoejH0x8szrnxmNonaYtY95LHUkhsGcCn9DNTsw X-Received: by 2002:a17:906:590b:: with SMTP id h11mr21583962ejq.147.1619691767208; Thu, 29 Apr 2021 03:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619691767; cv=none; d=google.com; s=arc-20160816; b=d+81ZFDgrpsvyroFSsnB90G57fJxnYU/rAyUciUjqXx3jClcLQNRWiwQuyhZoPdGZr Pqccjl8sd/58ANDl56F/EriDf8SFVloz0WYt/F1mk9FVOvXaM4sxHAxOQPm1CqIRlgjy sC5+2nbMhg3GCNxVp5RN53B287pKS1SJrngfLZrGhoeufBq/ujyvg24iljNNvdUWtheY 3i287mDXEyyRrS4MqMr1Zr7JqpJZpSrZ2X7O/5epjRcg3AuBCvrBHRkfj2w28JL4S0DB +Q52nvZpAmmKqJSM6ADgL4rLawmWw7zH7CwMYQMj6oBa1DLNnUerdJrHpQDbbuZlTPXK ZE9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=uycY3zRU6kJ29SM4glqd+4MrkjwtLXfGLBW8VXIMXtE=; b=pAnmJyAjz67eyriCQkV50C1985rNfi1MgWvFLLivox7XojiUqkZ01RNyarF6bstRJ4 L7Jq/AlK928T40JcFrjpYAmKIzx2eEu0n481Fq73pw5zqA/bK7QPgUPptXnxNmV77i1d 7nJRjVUmjirpGrPdKcUaHnfGK8HVk9BHfLbDROETZqML8mgA3YNPcM/tXwtpQpQA2pBc aa6y7IVFUwW00BviPijn+0wn5MAFsAx/jcyRwnpr5+us9INRyL8DndBIiwUyETR0fAiL YvrqYVzq5VG56EdgVvwUt5QZvoKyiK/8qbvks4u8QenjlO/nJYp2zegW+sEgXcOjOpYH OBXg== 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 p5si2873679ejl.31.2021.04.29.03.22.23; Thu, 29 Apr 2021 03:22:47 -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 S240332AbhD2KUz (ORCPT + 99 others); Thu, 29 Apr 2021 06:20:55 -0400 Received: from foss.arm.com ([217.140.110.172]:46144 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232629AbhD2KUs (ORCPT ); Thu, 29 Apr 2021 06:20:48 -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 2C1AE1FB; Thu, 29 Apr 2021 03:20:02 -0700 (PDT) Received: from e120189.arm.com (unknown [10.57.56.207]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2B3483F70D; Thu, 29 Apr 2021 03:19:58 -0700 (PDT) From: Pierre.Gondois@arm.com To: linux-kernel@vger.kernel.org, xuewen.yan@unisoc.com, qperret@qperret.net, dietmar.eggemann@arm.com Cc: Lukasz.Luba@arm.com, Vincent.Donnefort@arm.com, Pierre Gondois , 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 Subject: [PATCH v2 0/2] sched/fair: find_energy_efficient_cpu() enhancements Date: Thu, 29 Apr 2021 11:19:46 +0100 Message-Id: <20210429101948.31224-1-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre Gondois V2: - Split the patch in 2. [Quentin] - Add testing results to the cover-letter. [Dietmar] - Put back 'rcu_read_unlock()' to unlock the rcu earlier. [Dietmar] - Various comments. [Dietmar/Quentin] This patchset prevents underflows in find_energy_efficient_cpu(). This is done in the second patch: sched/fair: Fix negative energy delta in find_energy_efficient_cpu() The first patch: sched/fair: Only compute base_energy_pd if necessary prevents an unnecessary call to compute_energy() if no CPU is available in a performance domain (pd). When looping over the pds, it also allows to gather the calls to compute_energy(), reducing the chances of having utilization signals being concurrently updated and having a 'negative delta'. The energy tests of the initial EAS enablement at: https://lkml.kernel.org/r/20181203095628.11858-1-quentin.perret@arm.com have been executed using LISA on a Juno-r2 (2xA57 + 4xA53). To recall the test: "10 iterations of between 10 and 50 periodic rt-app tasks (16ms period, 5% duty-cycle) for 30 seconds with energy measurement. Unit is Joules. The goal is to save energy, so lower is better." "Energy is measured with the onboard energy meter. Numbers include consumption of big and little CPUs." +----------+-----------------+-------------------------+ | | Without patches | With patches | +----------+--------+--------+------------------+------+ | Tasks nb | Mean | CI* | Mean | CI* | +----------+--------+--------+------------------+------+ | 10 | 6.57 | 0.24 | 6.46 (-1.63%) | 0.27 | | 20 | 12.44 | 0.21 | 12.44 (-0.01%) | 0.14 | | 30 | 19.10 | 0.78 | 18.75 (-1.85%) | 0.15 | | 40 | 27.27 | 0.53 | 27.35 (+0.31%) | 0.33 | | 50 | 36.55 | 0.42 | 36.28 (-0.74%) | 0.42 | +----------+-----------------+-------------------------+ CI: confidence interval For each line, the intervals of values w/ w/o the patches are overlapping (consider Mean +/- CI). Thus, the energy results shouldn't have been impacted. Pierre Gondois (2): sched/fair: Only compute base_energy_pd if necessary sched/fair: Fix negative energy delta in find_energy_efficient_cpu() kernel/sched/fair.c | 66 ++++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 28 deletions(-) -- 2.17.1