Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3439446pxy; Tue, 4 May 2021 02:09:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyf+Gjxo7IYxhDQM364iT8LUxxskXeL/04nL1kL9bE+RKvstxCHPKbUMZ1LfrKVpXM3a6s8 X-Received: by 2002:a17:902:8502:b029:ee:beb2:e057 with SMTP id bj2-20020a1709028502b02900eebeb2e057mr15684715plb.30.1620119346292; Tue, 04 May 2021 02:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620119346; cv=none; d=google.com; s=arc-20160816; b=h/6CkMj6UEcvGghRQL+emJWLyCscp2JwdIOd1aHwPIpLHz7fILd78HQqx0t8kuzite Z5xEHTGGc96GRS7QoVj/Y5ihT06VBm3KmRn5UOMqSJem1gq5PG3OKeDk8SEzqxjMI0sF CwsXG3AenKosljDgFYZHZqutH2lnvYfJPqhKu2vrUUiY47dZrvjvU2ZsyokGVA4hqGZr LiUSFqI5yB2G3pQgVW2SZ+J76Ci+BcAFrogp6aIRDqHhJbgL3EpYcARKrwAvC0uyHXqN F4PIaevc3ZVT4AKkEfCL0teciqpWfccjWusZGjjhoIOM9jQ65g1EwNET58llZTjelrR7 39Fg== 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=g1WQ7Mr2el9swg/BnRSefzNTxX04GQt1i8MaZQq6Muk=; b=CaHqevkoX+JFzPGT0uVR8eJErxUZ4idkbq/l1biDOpgI6sWRtAUP0IRUIqdeu8xmkB aO2RDQhnmRUOfefUlT8KBaDrRFIDGVDGgndNOe40x96aj8c3tDNGaTv/c6FKZFtiCCe/ AFUt09P7oF9s+9kud+mEebwzerKDVN1I26sOn+qFNDxYDzTT1HRcf2BiqYqN9pK26onm 3pPSpbMsDEU/GpRi6PndKT0kXvOHH5H6d0VrnwxbLy4OhB6yrPwiPjN8V7fwbGp0lajJ AWdpB9q0/EJvmXKFfNBL3c9h8kUidov6xfnCBWaWloio9JPNMXOkWcGmGe7eEYSOdWMX I9fw== 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 i25si16520993pfr.173.2021.05.04.02.08.49; Tue, 04 May 2021 02:09:06 -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 S230004AbhEDJJF (ORCPT + 99 others); Tue, 4 May 2021 05:09:05 -0400 Received: from foss.arm.com ([217.140.110.172]:55944 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbhEDJJE (ORCPT ); Tue, 4 May 2021 05:09:04 -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 60D0DED1; Tue, 4 May 2021 02:08:09 -0700 (PDT) Received: from e120189.arm.com (unknown [10.57.63.61]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EAC933F73B; Tue, 4 May 2021 02:08:05 -0700 (PDT) From: Pierre Gondois To: linux-kernel@vger.kernel.org, xuewen.yan@unisoc.com, qperret@qperret.net, Lukasz.Luba@arm.com, dietmar.eggemann@arm.com Cc: 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 v3 0/2] sched/fair: find_energy_efficient_cpu() enhancements Date: Tue, 4 May 2021 10:07:41 +0100 Message-Id: <20210504090743.9688-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 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] V3: - Layout/phrasing. [Dietmar] 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 | 68 ++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 29 deletions(-) -- 2.17.1