From patchwork Wed Feb 7 13:34:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aishwarya Pant X-Patchwork-Id: 10205183 X-Patchwork-Delegate: rjw@sisk.pl 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 94D77602D8 for ; Wed, 7 Feb 2018 13:34:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7741228F30 for ; Wed, 7 Feb 2018 13:34:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68EEA28F7B; Wed, 7 Feb 2018 13:34:51 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, 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 E3C9528F30 for ; Wed, 7 Feb 2018 13:34:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753884AbeBGNet (ORCPT ); Wed, 7 Feb 2018 08:34:49 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:34167 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753876AbeBGNet (ORCPT ); Wed, 7 Feb 2018 08:34:49 -0500 Received: by mail-io0-f194.google.com with SMTP id c17so2027781iod.1; Wed, 07 Feb 2018 05:34:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=gCqcU7AfobjBy2czhFruQEnFECydOnzuvKxFB3cV3LQ=; b=hc8NhAyOBv9OvZx8fKmeZbgRoxIPOcUbLGS1DhNFuE6CIq2Hl/yEPUei4AaDaZJpeI 7a0i2JGtqWjIFa+dbuuIOX4yBsOZDiCENs+Ygfc011wfBbUa8FMfwSDI72D4I6keW4gA 1zDpTNAqBQhJkgTioR/RiWcxxlluhVCzSFtWvKaDhoekar6zqrKXhL61yZxkC1FOH6A8 /7vfBB+1GdoHEUuKv08WJbZSsIDSnWsyXuCo5lZSCinQiLdQT1rGi/TR0DdTTplLqbPV SD6S/I3cOm2dXKNPh5ufH6yflhf2v905bznLsswzv7vkuoBQtFwX/LVVp+mB2OvJAXe3 rcSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=gCqcU7AfobjBy2czhFruQEnFECydOnzuvKxFB3cV3LQ=; b=Ah4hao4J0E9VKjX/RJiRPkuQuXxnXugCc1LUNpA6ek7PIrd41MUJVzcEQ4/kW/tA+Y YDvptXeSecQ1rEKAc9fQIS+VJl288V4iTVf0Nqs8wlB6/+Ioq/NS6FGt5YgWolamMSDY JQBTKfepr7q4K9RpgM2qZvydHiLQf5tn7N89mgLGQPrKkRek+7n2356/SHjhMj29T6SY ysdrH4EES+N42Aj9nD8CnRLQZ+rP30Q/LSMr3qsTqHEKnVX2Ea8zDM1oLUtWg4hX0ZxY 7IQLFwcY/1t5ls0kN6KzWHR0MCDPaIQ50YcP0BkEFoNsBujt92CLxCVHAievri9jFLcB bt/g== X-Gm-Message-State: APf1xPA5C0LrDj/pQpofwIR5EAs1m5aXDqshfsvDqOOSsp2OYwhFpJPs Zfzpqa8Y/ndiTWk1/tgFKEk= X-Google-Smtp-Source: AH8x227K7YpTHKtqQcTqRHF7G3M2ALM+h0MsaI5u+2OMSYRLt1jG62fF5EWoxsSgEDVqsbPXJdVaJg== X-Received: by 10.107.142.2 with SMTP id q2mr7691306iod.21.1518010488102; Wed, 07 Feb 2018 05:34:48 -0800 (PST) Received: from mordor.localdomain ([106.216.161.135]) by smtp.gmail.com with ESMTPSA id y6sm1939126iod.7.2018.02.07.05.34.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2018 05:34:47 -0800 (PST) Date: Wed, 7 Feb 2018 19:04:36 +0530 From: Aishwarya Pant To: "Rafael J. Wysocki" , Daniel Lezcano , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet , Greg KH Cc: Julia Lawall Subject: [PATCH v5] Documentation/ABI: update cpuidle sysfs documentation Message-ID: <20180207133436.GA7440@mordor.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.3 (2018-01-21) 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 Update cpuidle documentation using git logs and existing documentation in Documentation/cpuidle/sysfs.txt. This might be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Changes in v5: - Update contact information- LKML -> power management mailing list v4: - Fix patch formatting v3: - Fix subject line v2: - Merge cpuidle_sysfs_switch attributes' description with the previous entry. Documentation/ABI/testing/sysfs-devices-system-cpu | 77 +++++++++++++++++++++- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index bfd29bc8d37a..4ed63b6cfb15 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -108,6 +108,8 @@ Description: CPU topology files that describe a logical CPU's relationship What: /sys/devices/system/cpu/cpuidle/current_driver /sys/devices/system/cpu/cpuidle/current_governer_ro + /sys/devices/system/cpu/cpuidle/available_governors + /sys/devices/system/cpu/cpuidle/current_governor Date: September 2007 Contact: Linux kernel mailing list Description: Discover cpuidle policy and mechanism @@ -119,13 +121,84 @@ Description: Discover cpuidle policy and mechanism Idle policy (governor) is differentiated from idle mechanism (driver) - current_driver: displays current idle mechanism + current_driver: (RO) displays current idle mechanism - current_governor_ro: displays current idle policy + current_governor_ro: (RO) displays current idle policy + + With the cpuidle_sysfs_switch boot option enabled (meant for + developer testing), the following three attributes are visible + instead: + + current_driver: same as described above + + available_governors: (RO) displays a space separated list of + available governors + + current_governor: (RW) displays current idle policy. Users can + switch the governor at runtime by writing to this file. See files in Documentation/cpuidle/ for more information. +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name + /sys/devices/system/cpu/cpuX/cpuidle/stateN/latency + /sys/devices/system/cpu/cpuX/cpuidle/stateN/power + /sys/devices/system/cpu/cpuX/cpuidle/stateN/time + /sys/devices/system/cpu/cpuX/cpuidle/stateN/usage +Date: September 2007 +KernelVersion: v2.6.24 +Contact: Linux power management list +Description: + The directory /sys/devices/system/cpu/cpuX/cpuidle contains per + logical CPU specific cpuidle information for each online cpu X. + The processor idle states which are available for use have the + following attributes: + + name: (RO) Name of the idle state (string). + + latency: (RO) The latency to exit out of this idle state (in + microseconds). + + power: (RO) The power consumed while in this idle state (in + milliwatts). + + time: (RO) The total time spent in this idle state (in microseconds). + + usage: (RO) Number of times this state was entered (a count). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc +Date: February 2008 +KernelVersion: v2.6.25 +Contact: Linux power management list +Description: + (RO) A small description about the idle state (string). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/disable +Date: March 2012 +KernelVersion: v3.10 +Contact: Linux power management list +Description: + (RW) Option to disable this idle state (bool). The behavior and + the effect of the disable variable depends on the implementation + of a particular governor. In the ladder governor, for example, + it is not coherent, i.e. if one is disabling a light state, then + all deeper states are disabled as well, but the disable variable + does not reflect it. Likewise, if one enables a deep state but a + lighter state still is disabled, then this has no effect. + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/residency +Date: March 2014 +KernelVersion: v3.15 +Contact: Linux power management list +Description: + (RO) Display the target residency i.e. the minimum amount of + time (in microseconds) this cpu should spend in this idle state + to make the transition worth the effort. + + What: /sys/devices/system/cpu/cpu#/cpufreq/* Date: pre-git history Contact: linux-pm@vger.kernel.org