From patchwork Fri Apr 14 18:19:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Pan X-Patchwork-Id: 9681529 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8919E601E7 for ; Fri, 14 Apr 2017 18:18:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FA54286B3 for ; Fri, 14 Apr 2017 18:18:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73A2A286CD; Fri, 14 Apr 2017 18:18:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3CAE286B3 for ; Fri, 14 Apr 2017 18:18:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754264AbdDNSSe (ORCPT ); Fri, 14 Apr 2017 14:18:34 -0400 Received: from mga14.intel.com ([192.55.52.115]:64418 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753957AbdDNSSe (ORCPT ); Fri, 14 Apr 2017 14:18:34 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Apr 2017 11:18:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,199,1488873600"; d="scan'208";a="87565648" Received: from jacob-builder.jf.intel.com ([10.7.199.158]) by orsmga005.jf.intel.com with ESMTP; 14 Apr 2017 11:18:27 -0700 From: Jacob Pan To: Jonathan Corbet , LKML Cc: Masanari Iida , Wang Xiaolong , Linux PM , Rafael Wysocki , Zhang Rui , Jacob Pan Subject: [PATCH] Doc/PM: Sync with intel_powerclamp code behavior Date: Fri, 14 Apr 2017 11:19:24 -0700 Message-Id: <1492193964-49735-1-git-send-email-jacob.jun.pan@linux.intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit feb6cd6a0f9f ("thermal/intel_powerclamp: stop sched tick in forced idle") changed how idle injection accouting, so we need to update the documentation accordingly. This patch also expands more details on the behavior of cur_state. Signed-off-by: Jacob Pan Reported-by: Wang, Xiaolong --- Documentation/thermal/intel_powerclamp.txt | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Documentation/thermal/intel_powerclamp.txt b/Documentation/thermal/intel_powerclamp.txt index 60073dc..b5df211 100644 --- a/Documentation/thermal/intel_powerclamp.txt +++ b/Documentation/thermal/intel_powerclamp.txt @@ -268,6 +268,15 @@ cur_state:0 max_state:50 type:intel_powerclamp +cur_state allows user to set the desired idle percentage. Writing 0 to +cur_state will stop idle injection. Writing a value between 1 and +max_state will start the idle injection. Reading cur_state returns the +actual and current idle percentage. This may not be the same value +set by the user in that current idle percentage depends on workload +and includes natural idle. When idle injection is disabled, reading +cur_state returns value -1 instead of 0 which is to avoid confusing +100% busy state with the disabled state. + Example usage: - To inject 25% idle time $ sudo sh -c "echo 25 > /sys/class/thermal/cooling_device80/cur_state @@ -278,11 +287,12 @@ then the powerclamp driver will not start idle injection. Using Top will not show idle injection kernel threads. If the system is busy (spin test below) and has less than 25% natural -idle time, powerclamp kernel threads will do idle injection, which -appear running to the scheduler. But the overall system idle is still -reflected. In this example, 24.1% idle is shown. This helps the -system admin or user determine the cause of slowdown, when a -powerclamp driver is in action. +idle time, powerclamp kernel threads will do idle injection. Forced +idle time is accounted as normal idle in that common code path is +taken as the idle task. + +In this example, 24.1% idle is shown. This helps the system admin or +user determine the cause of slowdown, when a powerclamp driver is in action. Tasks: 197 total, 1 running, 196 sleeping, 0 stopped, 0 zombie