Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1241604pxv; Fri, 25 Jun 2021 08:27:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUKF2qD9oIVb3LI6s6y4vXy8R52Z/NbuO+Mdv7eAsYePPQtb2fte0fF/iwHLvZHHrqd6XM X-Received: by 2002:a02:620a:: with SMTP id d10mr10098448jac.22.1624634841723; Fri, 25 Jun 2021 08:27:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624634841; cv=none; d=google.com; s=arc-20160816; b=VOBk0RvRGdPAHzsBI7Um/ZSwwqbj0b8+yvMebmASsugCOUa6AxALXuJwipmt+vALUX CnSKJiFbxMolRpxDbWs+qDECtIw9zEYETBuIWzxSGDm52enRY662tvgAkgBNG3P3v66V RW/JF4LgP6obIhldU92av9qWW19PTXTQb+8fUryCT/Meh2kS6qTLFjqho84gbQSXbO3k kmid68xgpmSISXaZAc2fD2FaVaJqWgfCbDh5OXbo78BUHhTMgeqfilJqB53XtrgmAlJh jbNOtBtlMoAXQFUrVZ5BMNn26OKXjKfybkAvFTYSxZeQQbiiiwvqw/Seq+pvAf6e5vj9 riGA== 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=6odwUIAY506RA1AAsc5584bf8h1xxhxhtdv2m/6txy4=; b=jWxwmYfzKz+a7ES7xkXejuZJGFP1fWW0cj+CoiEHYeoS48onbwGG2gpG1mxuRPBofu gSp5+9lunKG1R79Kmkwgfn2c/q35csWUcQWaH4fD9CSwdDt0SC/UR3LeRlTWtBtKJHZs Pabrv0g8xlQMXxkws1p/3LFs9GY/vG2SdRordZ1pngtbfrSDSABvAmQh2eEgOyBKKg7H p/6tORLNXWOxq49IGniNMxs/KiKrrrPP2EswfRPezkwimKt3MwuJ/mQdTiYyetnh1APU Y4lITPd+eVXg+HJnxyK5OmZHtdPVwwEOW3mzlMFQDRa/Hey2jDhqUe4ENdp1eLMMpVKK r/Jw== 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 p16si5910551ioh.24.2021.06.25.08.27.09; Fri, 25 Jun 2021 08:27:21 -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 S229738AbhFYP3B (ORCPT + 99 others); Fri, 25 Jun 2021 11:29:01 -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-kernel@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(-) -- 2.17.1