From patchwork Tue Jan 2 05:21:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 123094 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8574672qgn; Mon, 1 Jan 2018 21:22:14 -0800 (PST) X-Google-Smtp-Source: ACJfBosT8PW/cDbQ0R2pzmS9hbe/yZYUYALhWXH6Fr9b2ZPMqXwIk5BrPmnr3nDWXmk71g0z/MzE X-Received: by 10.159.234.1 with SMTP id be1mr44848757plb.201.1514870533887; Mon, 01 Jan 2018 21:22:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514870533; cv=none; d=google.com; s=arc-20160816; b=CH7sc8qUSBCufqfMY2OUE0MFIDVAkmiJ0To33aCH92N1tE31CAzvHNvBLjYgxcFOSy YV8y1iRNlWuy/44wquokLB45KPchgxCNjA8mV/uY2g6YwZt732hJNA2AaV/QkNubQm1/ 8KhJ1XTU90xzlNG9rmf68JFCWnYAX4zirxIbgWwiicZTDBF605z+tWRK7e7v4VyAzWws 9H2Y8+T/K/Fp4yQWI6liS+U9OFt53O1Zbp0XJUpuSSFt7yw/RzXIXXZ3GrtYrrOmILOj ENXrG2QRc6L/mny6laiD0wMQGaIZx49CHEXx+4kclW437/fbd3MtvoyZidvR5WjqZI+t C4fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=i2b8vcSAFB/j6fzdNDxq4p482sCZbDm5IbgQIjNQOdE=; b=OoP2KATKHqF0AyUg84+WILzuN+tPITkez2or4YEPDHwwBoQeTsWyLhgNgmbyuBRmlI RK2cQ1O4yyWSMRMTJrWZ9zm4snRvVUx9VJBLPnYhyi6mhObShY3KJjoZI2L/FYCwj3Ek 4lfbsKz7qiGV8qlF/Lxb+2C+KRBFCNg7V3TQgURNOZt5MU1RzDTV5dMdSrVRxKtRQ0eK YAEMKWhDloWAAw/hC46mLffnGvmLuthnfx82YRt2c86Bi8oZ9rt9XxPY6TRjW5ORUBIx 05KB2c2cDTdDOFpTTLS/60XEKSkmMkxbwYTKw+fMz/S64coxKgkUipj9f76MKVfPsg81 QIDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bq/fcB8P; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a33si33457557plc.490.2018.01.01.21.22.13; Mon, 01 Jan 2018 21:22:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bq/fcB8P; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751422AbeABFV7 (ORCPT + 11 others); Tue, 2 Jan 2018 00:21:59 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34641 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbeABFV6 (ORCPT ); Tue, 2 Jan 2018 00:21:58 -0500 Received: by mail-pf0-f193.google.com with SMTP id a90so25286431pfk.1 for ; Mon, 01 Jan 2018 21:21:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=i2b8vcSAFB/j6fzdNDxq4p482sCZbDm5IbgQIjNQOdE=; b=bq/fcB8PjrFl48Mft3IGEqVWliHd0gm795sRH1bVxvmcvXzdKrKw0FxpDZvb8/mJFn 6K2BVWWYYt1QlsgPeyGr/K+T9ajG877olr7pxI0uBvQbg/k4sx/WTLkGHDI6Kf4kw/Rf x69aU9H6NxOsg96kjcTz7DdL7kCyFFGEISKmA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=i2b8vcSAFB/j6fzdNDxq4p482sCZbDm5IbgQIjNQOdE=; b=FsICyYEaFgXVUcK1HjSSqvjEJ1fjlfftH7WwL8tawFvolS9cF3BmEPEM3u8Pea2EWq D18cgZqhJRRhOPoI3NPvw+KvrtbirGHYQGqFpX7YiJtaCTxGk86hj23ttSm1T5p5j8Iz XKxrOfDlVixZAnsVcnbYHwBmhFDT3R/oLC2qTPAJp1Dq/UEozllMbDx/14xZY9kijOsb ihtpIY4BhOHfTF6v2BaVzOwio+dZSzUHNXLN1QKCdZdnMEmRRwkl6XOLBVrUCHbdX7J6 me7WeccXKwcobg1/LgfTyJsztLAGCBYMvvsJRr6c80qV7iJAUhoOM9tRi/FW0oRmN+2D 7tsQ== X-Gm-Message-State: AKGB3mJ7N6AONK42kMkmHQv5SpNPf2Kci2kO9lRI9qzg8QAtvWLfY30K 2JFlVTLwTZTgN1O2yF/Awypq8A== X-Received: by 10.98.63.16 with SMTP id m16mr44721425pfa.218.1514870517933; Mon, 01 Jan 2018 21:21:57 -0800 (PST) Received: from localhost ([122.172.219.75]) by smtp.gmail.com with ESMTPSA id g7sm45167037pgo.83.2018.01.01.21.21.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jan 2018 21:21:56 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Amit Daniel Kachhap , Javi Merino Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , rui.zhang@intel.com, edubezval@gmail.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cpu_cooling: Remove static-power related documentation Date: Tue, 2 Jan 2018 10:51:34 +0530 Message-Id: <09947bfdaf86f674f8495849b88118065841a4f2.1514870425.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org commit 84fe2cab4859 ("cpu_cooling: Drop static-power related stuff") removed support for static-power in kernel, but it missed reflecting the same in documentation. Remove the static power related documentation bits as well. Reported-by: Javi Merino Signed-off-by: Viresh Kumar --- Documentation/thermal/cpu-cooling-api.txt | 82 +------------------------------ 1 file changed, 2 insertions(+), 80 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/Documentation/thermal/cpu-cooling-api.txt b/Documentation/thermal/cpu-cooling-api.txt index 7a1c89db0419..7df567eaea1a 100644 --- a/Documentation/thermal/cpu-cooling-api.txt +++ b/Documentation/thermal/cpu-cooling-api.txt @@ -44,16 +44,14 @@ the user. The registration APIs returns the cooling device pointer. 2. Power models The power API registration functions provide a simple power model for -CPUs. The current power is calculated as dynamic + (optionally) -static power. This power model requires that the operating-points of +CPUs. The current power is calculated as dynamic power (static power isn't +supported currently). This power model requires that the operating-points of the CPUs are registered using the kernel's opp library and the `cpufreq_frequency_table` is assigned to the `struct device` of the cpu. If you are using CONFIG_CPUFREQ_DT then the `cpufreq_frequency_table` should already be assigned to the cpu device. -2.1 Dynamic power - The dynamic power consumption of a processor depends on many factors. For a given processor implementation the primary factors are: @@ -92,79 +90,3 @@ mW/MHz/uVolt^2. Typical values for mobile CPUs might lie in range from 100 to 500. For reference, the approximate values for the SoC in ARM's Juno Development Platform are 530 for the Cortex-A57 cluster and 140 for the Cortex-A53 cluster. - - -2.2 Static power - -Static leakage power consumption depends on a number of factors. For a -given circuit implementation the primary factors are: - -- Time the circuit spends in each 'power state' -- Temperature -- Operating voltage -- Process grade - -The time the circuit spends in each 'power state' for a given -evaluation period at first order means OFF or ON. However, -'retention' states can also be supported that reduce power during -inactive periods without loss of context. - -Note: The visibility of state entries to the OS can vary, according to -platform specifics, and this can then impact the accuracy of a model -based on OS state information alone. It might be possible in some -cases to extract more accurate information from system resources. - -The temperature, operating voltage and process 'grade' (slow to fast) -of the circuit are all significant factors in static leakage power -consumption. All of these have complex relationships to static power. - -Circuit implementation specific factors include the chosen silicon -process as well as the type, number and size of transistors in both -the logic gates and any RAM elements included. - -The static power consumption modelling must take into account the -power managed regions that are implemented. Taking the example of an -ARM processor cluster, the modelling would take into account whether -each CPU can be powered OFF separately or if only a single power -region is implemented for the complete cluster. - -In one view, there are others, a static power consumption model can -then start from a set of reference values for each power managed -region (e.g. CPU, Cluster/L2) in each state (e.g. ON, OFF) at an -arbitrary process grade, voltage and temperature point. These values -are then scaled for all of the following: the time in each state, the -process grade, the current temperature and the operating voltage. -However, since both implementation specific and complex relationships -dominate the estimate, the appropriate interface to the model from the -cpu cooling device is to provide a function callback that calculates -the static power in this platform. When registering the cpu cooling -device pass a function pointer that follows the `get_static_t` -prototype: - - int plat_get_static(cpumask_t *cpumask, int interval, - unsigned long voltage, u32 &power); - -`cpumask` is the cpumask of the cpus involved in the calculation. -`voltage` is the voltage at which they are operating. The function -should calculate the average static power for the last `interval` -milliseconds. It returns 0 on success, -E* on error. If it -succeeds, it should store the static power in `power`. Reading the -temperature of the cpus described by `cpumask` is left for -plat_get_static() to do as the platform knows best which thermal -sensor is closest to the cpu. - -If `plat_static_func` is NULL, static power is considered to be -negligible for this platform and only dynamic power is considered. - -The platform specific callback can then use any combination of tables -and/or equations to permute the estimated value. Process grade -information is not passed to the model since access to such data, from -on-chip measurement capability or manufacture time data, is platform -specific. - -Note: the significance of static power for CPUs in comparison to -dynamic power is highly dependent on implementation. Given the -potential complexity in implementation, the importance and accuracy of -its inclusion when using cpu cooling devices should be assessed on a -case by case basis. -