Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964959AbbBJAit (ORCPT ); Mon, 9 Feb 2015 19:38:49 -0500 Received: from mail-pd0-f173.google.com ([209.85.192.173]:33521 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964938AbbBJAip (ORCPT ); Mon, 9 Feb 2015 19:38:45 -0500 From: Eduardo Valentin To: Rui Zhang , ezequiel.garcia@free-electrons.com, amit.kachhap@linaro.org, viresh.kumar@linaro.org, amit.daniel@samsung.com, hongbo.zhang@linaro.com, andrew@lunn.ch, durgadoss.r@intel.com, peter@piie.net, shawn.guo@linaro.org, aaron.lu@intel.com, caesar.wang@rock-chips.com, b.zolnierkie@samsung.com, l.majewski@samsung.com, vincenzo.frascino@st.com, mperttunen@nvidia.com, mikko.perttunen@kapsi.fi, srinivas.pandruvada@linux.intel.com, jacob.jun.pan@linux.intel.com, bcousson@baylibre.com Cc: LKML , Linux PM , Eduardo Valentin Subject: [PATCH RFC 12/12] Documentation: thermal docbook: introduce governor chapter Date: Mon, 9 Feb 2015 17:34:13 -0400 Message-Id: <1423517653-11359-13-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1423517653-11359-1-git-send-email-edubezval@gmail.com> References: <1423517653-11359-1-git-send-email-edubezval@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3682 Lines: 99 In this patch we add a chapter in the thermal docbook to describe the existing governors. The chapter contains one section per governor. Each governor description includes the respective code documentation. Each governor section contains a description of the governor logic. Signed-off-by: Eduardo Valentin --- Documentation/DocBook/thermal.tmpl | 67 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/Documentation/DocBook/thermal.tmpl b/Documentation/DocBook/thermal.tmpl index d6ebbea..cf1a198 100644 --- a/Documentation/DocBook/thermal.tmpl +++ b/Documentation/DocBook/thermal.tmpl @@ -212,6 +212,73 @@ + + + Thermal Governors + + + + + step_wise Thermal Governor + Step Wise uses the trend of the thermal zone to + throttle. If the thermal zone is 'heating up' this + throttles all the cooling devices associated with the + zone and its particular trip point, by one step. If the + zone is 'cooling down' it brings back the performance + of the devices by one step. + +!Idrivers/thermal/step_wise.c +!Pdrivers/thermal/step_wise.c Algorithm + + + fair_share Thermal Governor + Fair Share Governor uses three parameters to + calculate the new throttle state of the cooling devices + associated with the given zone. Parameters used for + Throttling: + + + P1. max_state: Maximum throttle state + exposed by the cooling device. + P2. weight[i]/100: + How 'effective' the 'i'th device is, + in cooling the given zone. + P3. + cur_trip_level/max_no_of_trips: + + This describes the extent to which the devices + should be throttled. We do not want to throttle too + much when we trip a lower temperature, whereas the + throttling is at full swing if we trip critical levels. + Heavily assumes the trip points are in ascending order + new_state of cooling device = P3 * P2 * P1. + +!Idrivers/thermal/fair_share.c + + + bang_bang Thermal Governor + The Bang Bang Governor has a two point regulation + logic, deliver cooling state depending on the previous + state shown in this diagram: + If the fan is not running and temperature exceeds + trip_temp, the fan gets turned on. In case the fan is + running, temperature must fall below (trip_temp - hyst) + so that the fan gets turned off again. + +!Idrivers/thermal/gov_bang_bang.c + + + user_space Thermal Governor + The User Space governor is outside the Kernel. + The Thermal Framework hands off the entire control to + userland if the User Space governor is assigned to a + thermal zone. A KOBJ_CHANGE UEvent notification is sent + to userland whenever a governor needs to take an + action. + +!Idrivers/thermal/user_space.c + + Thermal Device Driver Writer API reference This Chapter contains an API reference for Thermal driver writers. -- 2.1.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/