Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2015000ybz; Thu, 30 Apr 2020 09:21:23 -0700 (PDT) X-Google-Smtp-Source: APiQypLkGkbD3+WJPI4lDCOBxW4z8Zl+wxG1qydcBjRcT6tkcuuw/QZ5bzUKXiD7GxK8UGeIPTbK X-Received: by 2002:a50:b961:: with SMTP id m88mr3526157ede.4.1588263683149; Thu, 30 Apr 2020 09:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588263683; cv=none; d=google.com; s=arc-20160816; b=DgopxxfKNKJzpEjT0gkf5LbgpwTb4vrdZhHJN/YmcfKqkXIQnixquKrEEMhIdn9Hiq qW28Wf/3M7a7jbH//lEJMgkFtqTfQNU2arCI31NoJkVpWzcqcdvmq5AfDAVjeMVkBawc haE8AVoC3h3HtyaZPYVztGbifp4e7sxSWM8bKRDF4ejlu6c7PW2n+qVQyv4tMOgI3MDR IawXnwwSNZsy/Xfno50omee6/y8Loi1fCFmRe/QpOJR7B7Ug0HkoxfeRYDJGCNY1FeNg tIoRru1ct53K/Z4HV/QPdQwEKtPRZToY7cIjCvZiqJFbgAxM58Rajn/mqY6d7UM1Ueru BrOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IbO0JfMdkBmAGjWXjLCLUt1hVPfSQow/HR0TmKCv4Lg=; b=dysWyvAlps4Y9CXgrkyIsMeuh0V7aRkHhpjL0Nv8EM9SQk4g0N3DQ53psQWVWwZaAJ 5qCqLBAUQUoeQB5V3PHmMJRistVpvvD0E8WmJ18mzPvL2W5o5LbxFTASqM7kqxIaRzVv cSnSHo2TBoU4CoXBEPyC4E8/v1FkpCoDacIbJzfg4xVhBKEgLuZw1XTOs4hQBngevZz4 4o8losoV4gJOJqxN5NFR1O0NNJTJi2jMChZrhR1fnvXM+iNwPNyscWYk/k6IGoHKxnga 744MjLnJoCU0eZiQ4nqB+pPP7LlXP2G5b8MEBPL/4Y+/6N8gHQaz0bCMizG2TluKJChK ZB1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=t615eT3Q; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by15si83382ejb.229.2020.04.30.09.20.58; Thu, 30 Apr 2020 09:21:23 -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; dkim=pass header.i=@kernel.org header.s=default header.b=t615eT3Q; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728239AbgD3QSr (ORCPT + 99 others); Thu, 30 Apr 2020 12:18:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:58578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726420AbgD3QSi (ORCPT ); Thu, 30 Apr 2020 12:18:38 -0400 Received: from mail.kernel.org (ip5f5ad5c5.dynamic.kabel-deutschland.de [95.90.213.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A560320873; Thu, 30 Apr 2020 16:18:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588263517; bh=lW4zzFS0G9Wi4Z0P+nqG08m6PRjTTMBcjkMLSKAEx/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t615eT3Q9pNpfUIrouBfac8mgll8VUS4jr3Ag7enyIc+LVo6TA9j3lMsuJE9cQQfz sf9wlQhSNxFOavyUaeU7+062U1oEI3YBwpstTJ/7fZTx03yIZqvRcaMolvo/ohpyig cmqXaXddzzJQ9zOGjwxL1N0Mwus6QNxjBg+E8ROc= Received: from mchehab by mail.kernel.org with local (Exim 4.92.3) (envelope-from ) id 1jUBtT-00Axge-S6; Thu, 30 Apr 2020 18:18:35 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet , Amit Daniel Kachhap , Daniel Lezcano , Viresh Kumar , Javi Merino , linux-pm@vger.kernel.org Subject: [PATCH v4 01/19] docs: thermal: convert cpu-idle-cooling.rst to ReST Date: Thu, 30 Apr 2020 18:18:15 +0200 Message-Id: <617873f33407a764671be95d4ee15afa6027c924.1588263270.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Despite being named with .rst extension, this file doesn't match the ReST standard. It actually causes a crash at Sphinx: Sphinx parallel build error: docutils.utils.SystemMessage: /devel/v4l/docs/Documentation/driver-api/thermal/cpu-idle-cooling.rst:69: (SEVERE/4) Unexpected section title. Add needed markups for it to be properly parsed. While here, add it to the thermal index.rst. Signed-off-by: Mauro Carvalho Chehab --- .../driver-api/thermal/cpu-idle-cooling.rst | 18 ++++++++++++------ Documentation/driver-api/thermal/index.rst | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Documentation/driver-api/thermal/cpu-idle-cooling.rst b/Documentation/driver-api/thermal/cpu-idle-cooling.rst index a1c3edecae00..b5a4544af004 100644 --- a/Documentation/driver-api/thermal/cpu-idle-cooling.rst +++ b/Documentation/driver-api/thermal/cpu-idle-cooling.rst @@ -1,3 +1,9 @@ +.. SPDX-License-Identifier: GPL-2.0 + +================ +CPU Idle Cooling +================ + Situation: ---------- @@ -45,7 +51,7 @@ idle state target residency, we lead to dropping the static and the dynamic leakage for this period (modulo the energy needed to enter this state). So the sustainable power with idle cycles has a linear relation with the OPP’s sustainable power and can be computed with a -coefficient similar to: +coefficient similar to:: Power(IdleCycle) = Coef x Power(OPP) @@ -136,7 +142,7 @@ Power considerations -------------------- When we reach the thermal trip point, we have to sustain a specified -power for a specific temperature but at this time we consume: +power for a specific temperature but at this time we consume:: Power = Capacitance x Voltage^2 x Frequency x Utilisation @@ -145,7 +151,7 @@ wrong in the system setup). The ‘Capacitance’ and ‘Utilisation’ are a fixed value, ‘Voltage’ and the ‘Frequency’ are fixed artificially because we don’t want to change the OPP. We can group the ‘Capacitance’ and the ‘Utilisation’ into a single term which is the -‘Dynamic Power Coefficient (Cdyn)’ Simplifying the above, we have: +‘Dynamic Power Coefficient (Cdyn)’ Simplifying the above, we have:: Pdyn = Cdyn x Voltage^2 x Frequency @@ -154,7 +160,7 @@ in order to target the sustainable power defined in the device tree. So with the idle injection mechanism, we want an average power (Ptarget) resulting in an amount of time running at full power on a specific OPP and idle another amount of time. That could be put in a -equation: +equation:: P(opp)target = ((Trunning x (P(opp)running) + (Tidle x P(opp)idle)) / (Trunning + Tidle) @@ -165,7 +171,7 @@ equation: At this point if we know the running period for the CPU, that gives us the idle injection we need. Alternatively if we have the idle -injection duration, we can compute the running duration with: +injection duration, we can compute the running duration with:: Trunning = Tidle / ((P(opp)running / P(opp)target) - 1) @@ -188,7 +194,7 @@ However, in this demonstration we ignore three aspects: target residency, otherwise we end up consuming more energy and potentially invert the mitigation effect -So the final equation is: +So the final equation is:: Trunning = (Tidle - Twakeup ) x (((P(opp)dyn + P(opp)static ) - P(opp)target) / P(opp)target ) diff --git a/Documentation/driver-api/thermal/index.rst b/Documentation/driver-api/thermal/index.rst index 5ba61d19c6ae..4cb0b9b6bfb8 100644 --- a/Documentation/driver-api/thermal/index.rst +++ b/Documentation/driver-api/thermal/index.rst @@ -8,6 +8,7 @@ Thermal :maxdepth: 1 cpu-cooling-api + cpu-idle-cooling sysfs-api power_allocator -- 2.25.4