From patchwork Fri Jun 25 15:26:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 467666 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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 48719C2B9F4 for ; Fri, 25 Jun 2021 15:26:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2076561450 for ; Fri, 25 Jun 2021 15:26:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229586AbhFYP3A (ORCPT ); Fri, 25 Jun 2021 11:29:00 -0400 Received: from foss.arm.com ([217.140.110.172]:58614 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbhFYP3A (ORCPT ); Fri, 25 Jun 2021 11:29:00 -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 4545F1042; Fri, 25 Jun 2021 08:26:39 -0700 (PDT) Received: from e123648.arm.com (unknown [10.57.7.232]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 241633F694; Fri, 25 Jun 2021 08:26:35 -0700 (PDT) From: Lukasz Luba To: linux-kernel@vger.kernel.org Cc: Chris.Redpath@arm.com, lukasz.luba@arm.com, dietmar.eggemann@arm.com, morten.rasmussen@arm.com, qperret@google.com, linux-pm@vger.kernel.org, peterz@infradead.org, rjw@rjwysocki.net, viresh.kumar@linaro.org, vincent.guittot@linaro.org, mingo@redhat.com, juri.lelli@redhat.com, rostedt@goodmis.org, segall@google.com, mgorman@suse.de, bristot@redhat.com, CCj.Yeh@mediatek.com Subject: [PATCH 0/3] Improve EAS energy estimation and increase precision Date: Fri, 25 Jun 2021 16:26:00 +0100 Message-Id: <20210625152603.25960-1-lukasz.luba@arm.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi all, The patch set aims to address a scenario for Energy Aware Scheduler, where we estimate and compare energy values and miss a more precised results. In some use cases estimations for two CPUs might give the same values for a given task and it's utilization. Those values would be different when we have a better precision and avoid this rounding error. Thus, the decision of choosing a CPU for a waking-up task might also be better. We have received this feedback from our partners. Address this rounding error issue and increase the precision of Energy Model em_perf_state::cost values. This change should not affect other subsystems in kernel: thermal IPA, PowerCap DTPM, etc, since they use em_perf_state::power field, which is not touched. It also doesn't trigger the need for updating all existing platforms to register EM and report power values in different scale. Regards, Lukasz Lukasz Luba (3): sched/fair: Prepare variables for increased precision of EAS estimated energy PM: EM: Make em_cpu_energy() able to return bigger values PM: EM: Increase energy calculation precision include/linux/energy_model.h | 11 +++++++---- kernel/power/energy_model.c | 3 ++- kernel/sched/fair.c | 13 +++++++------ 3 files changed, 16 insertions(+), 11 deletions(-)