From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Yan Subject: [PATCH v2 0/4] thermal: re-calculate k_po/k_pu when update sustainable power Date: Wed, 6 Jan 2016 16:30:19 +0800 Message-ID: <1452069023-32149-1-git-send-email-leo.yan@linaro.org> Return-path: Received: from mail-pa0-f48.google.com ([209.85.220.48]:32881 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752043AbcAFIaf (ORCPT ); Wed, 6 Jan 2016 03:30:35 -0500 Received: by mail-pa0-f48.google.com with SMTP id cy9so229947237pac.0 for ; Wed, 06 Jan 2016 00:30:35 -0800 (PST) Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Jonathan Corbet , Zhang Rui , Eduardo Valentin , Javi Merino , Punit Agrawal , Daniel Kurtz , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Daniel Thompson Cc: Leo Yan k_po/k_pu are two proportional term constants and essentially they have fixed ratio compared with sustainable power. In current implementation, k_po and k_pu are absolute value after calculation and cannot represent the ratio relationship with sustainable power; as a result, when change sustainable power we cannot smoothly change proportional term constant. So this patch series introduces k_po_ratio and k_pu_ratio, which represent the ratio value compared against sustainable power. Also add sys file system nodes for them for easily update them from userspace and update a bit in documentation. Changes from v1: * According to Eduardo' comments, move code from thermal_core to power_allocator file * According to Daniel's review, v1 will introduce accumulated rounding errors; v2 patches can dismiss this issue Leo Yan (4): thermal: power_allocator: rework proportional parameter thermal: power_allocator: change k_pu_ratio/k_po_ratio as percentage thermal: add sys node for k_pu_ratio/k_po_ratio thermal: power_allocator: document k_pu_ratio/k_po_ratio Documentation/thermal/power_allocator.txt | 15 +++++++++++---- drivers/thermal/power_allocator.c | 18 ++++++++++++------ drivers/thermal/thermal_core.c | 23 +++++++++++++++++++++-- include/linux/thermal.h | 4 ++-- 4 files changed, 46 insertions(+), 14 deletions(-) -- 1.9.1