From patchwork Mon Oct 19 14:05:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 11844437 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=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 01889C43457 for ; Mon, 19 Oct 2020 14:08:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84F0622263 for ; Mon, 19 Oct 2020 14:07:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L5sLrs5Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84F0622263 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ToYOx7ODGbpn/9GOS1TmQ3+iKShsAhlxBv40IK8pY4w=; b=L5sLrs5QK+FI6UGYQWuUbxiW8U T/40dd4LMrj9bixaCCzkvXseBxh6LWvvyR6minO8ak7+Q5vGSdiwPybJyTIzycp2U8oGYu1U3KHtJ EV2gSDq5A9bavAbFN12yBn89I9V5fZIusgUZ3vNFB7COUcFN2xc5XMcfv5jN2z6ZCpohAoTjtfVoy Ta3OocAJn42TMiVJaowNTdQ5Z6MSK5Rk6wIaLSLMBSmM477q0zgsWuWEjjc60ancQCWZGwMJp3Xdh gWi02X+Um3mV24cgGblgOc59LgruVZW2aS7ziqiLcNsMPoYLmvJeRE0aQoJl6RC5KiNnTTTM2qVfY obONpusw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVns-0003vl-P7; Mon, 19 Oct 2020 14:06:24 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUVnp-0003us-V2 for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2020 14:06:22 +0000 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 2CBEFD6E; Mon, 19 Oct 2020 07:06:20 -0700 (PDT) Received: from e123648.arm.com (unknown [10.57.15.200]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 91F893F66E; Mon, 19 Oct 2020 07:06:15 -0700 (PDT) From: Lukasz Luba To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/4] Clarify abstract scale usage for power values in Energy Model, EAS and IPA Date: Mon, 19 Oct 2020 15:05:57 +0100 Message-Id: <20201019140601.3047-1-lukasz.luba@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_100622_084189_B3F239F1 X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nm@ti.com, rafael@kernel.org, daniel.lezcano@linaro.org, rnayak@codeaurora.org, corbet@lwn.net, sboyd@kernel.org, viresh.kumar@linaro.org, mka@chromium.org, amitk@kernel.org, dianders@chromium.org, morten.rasmussen@arm.com, robh+dt@kernel.org, sudeep.holla@arm.com, qperret@google.com, Dietmar.Eggemann@arm.com, lukasz.luba@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all, The Energy Model supports power values expressed in an abstract scale. This has an impact on Intelligent Power Allocation (IPA) and should be documented properly. Kernel sub-systems like EAS, IPA and DTPM (new comming PowerCap framework) would use the new flag to capture potential miss-configuration where the devices have registered different power scales, thus cannot operate together. There was a discussion below v2 of this patch series, which might help you to get context of these changes [2]. The agreed approach is to have the DT as a source of power values expressed always in milli-Watts and the only way to submit with abstract scale values is via the em_dev_register_perf_domain() API. Changes: v3: - added boolean flag to struct em_perf_domain and registration function indicating if EM holds real power values in milli-Watts (suggested by Daniel and aggreed with Quentin) - updated documentation regarding this new flag - dropped DT binding change for 'sustainable-power' - added more maintainers on CC (due to patch 1/4 touching different things) v2 [2]: - updated sustainable power section in IPA documentation - updated DT binding for the 'sustainable-power' v1 [1]: - simple documenation update with new 'abstract scale' in EAS, EM, IPA Regards, Lukasz Luba [1] https://lore.kernel.org/linux-doc/20200929121610.16060-1-lukasz.luba@arm.com/ [2] https://lore.kernel.org/lkml/20201002114426.31277-1-lukasz.luba@arm.com/ Lukasz Luba (4): PM / EM: Add a flag indicating units of power values in Energy Model docs: Clarify abstract scale usage for power values in Energy Model PM / EM: update the comments related to power scale docs: power: Update Energy Model with new flag indicating power scale .../driver-api/thermal/power_allocator.rst | 13 +++++++- Documentation/power/energy-model.rst | 30 +++++++++++++++---- Documentation/scheduler/sched-energy.rst | 5 ++++ drivers/cpufreq/scmi-cpufreq.c | 3 +- drivers/opp/of.c | 2 +- include/linux/energy_model.h | 20 ++++++++----- kernel/power/energy_model.c | 26 ++++++++++++++-- 7 files changed, 81 insertions(+), 18 deletions(-)