From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: ARC-Seal: i=1; a=rsa-sha256; t=1516722269; cv=none; d=google.com; s=arc-20160816; b=Hj/QZPZw0VKHiU14dDzRYwP9NKtVeC7bzPsPAbFIIhEbHVfiBUr2FyJY8CGL6vWDSr aiTUgiVpKBLOyIWqrpT975gYZW68CFoCtEbEpukbGWp7oaVnvkCjl86KJ8uBIRqf7XPV 1E9vKeQF/YNskqnA19RYshyMyMPUqzaOMcQ6GWj5pv2m5wfrHhVq9JX4glTLZGBR5g53 Cogk9NjG4cgqGbf+GhoxNVFe8+IC8xA5YRPHIb/vS660FHyOnOUIpYaznk6av2ibQ27L Gd2xCUNC8FSe92B3sPQmBG0SRd7+Biv4ZOH4ymzQeKoxEr1aECIZCjStmEo64w4DOLs/ 1+BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:content-disposition:mime-version:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=GIuAQdqmFRTF+tHcWDwxOkdcXvZeb4yUD/m+ku/6sRQ=; b=gLRYO8UuBmHZQ4Wew7N2GY3NGtz/ZpmMqoDSD70uag+5ys7x0WHzeXWkqo5GRka2X+ Pbz3rWAOEWwYgpIsWp+/8aIk9m7wOW0Gq0hZI4EVZmx6SqyfVYrBjLohsgIc4Jpl3Hdw RlKiWQh0dG1xnTA3l2zYludEIVrqzgp84kr5AIy8Grqxize9FPff26+A0cjUkUx2mm0k E7LNSwmXYiA07AEszIsYePSJ7QYOR4eND/mnXXgVOmnxMzIeb6e9fxZgvOda16gn4L75 ZYdzG2faLyLfVDZ5WHcV8vFmKUyLaJxuMqdyD8S4APNC51dnNUDX7v+/dS1xN6k4IFeZ xp1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u8mEeptR; spf=pass (google.com: domain of aishpant@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=aishpant@gmail.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u8mEeptR; spf=pass (google.com: domain of aishpant@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=aishpant@gmail.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com X-Google-Smtp-Source: AH8x225/tL5Rrcqxcm/TEvZolIUjlX8yca2A3g8qIahzPAlwzZPOVTwbsmhW9YF+HQJbDUwySvpAmg== Date: Tue, 23 Jan 2018 21:14:22 +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 v3] Documentation/ABI: update cpuidle sysfs documentation Message-ID: <20180123154422.GA26644@mordor.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590398570415951220?= X-GMAIL-MSGID: =?utf-8?q?1590398570415951220?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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 --- Change in v3: - Fix up the mess up in the subject line of previous version Change in v2: - Merge cpuidle_sysfs_switch attributes' description with the previous entry. Documentation/ABI/testing/sysfs-devices-system-cpu | 80 +++++++++++++++++++++- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index bfd29bc8d37a..113402ca9397 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_governor_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,87 @@ Description: Discover cpuidle policy and mechanism Idle policy (governor) is differentiated from idle mechanism (driver) - current_driver: displays current idle mechanism + System global cpuidle related information and tunables are under + /sys/devices/system/cpu/cpuidle. Briefly, the attributes are: - current_governor_ro: displays current idle policy + current_driver: (RO) displays current idle mechanism + + 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 kernel mailing 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 kernel mailing 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 kernel mailing 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 kernel mailing 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 -- 2.16.1