Received: by 10.223.176.5 with SMTP id f5csp1031723wra; Tue, 6 Feb 2018 11:21:23 -0800 (PST) X-Google-Smtp-Source: AH8x226NbMpY3BL8oBM1s2NAcSkSxfk5LCFvdSXffoxJNXyg0+1kSfeotXn4VfPMjMHU3zHf+xBO X-Received: by 2002:a17:902:12f:: with SMTP id 44-v6mr3404249plb.403.1517944883716; Tue, 06 Feb 2018 11:21:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517944883; cv=none; d=google.com; s=arc-20160816; b=Ak4jXbkfvtI/oRlBF8N/clm7p7qtXCbGj7mHo7k+GgAZ+xeOvO2/1jJJlXhdYrI28o 2Ls5e/p8RqAdNBYLsaVI86VEVdJlkNzNuLuqb/rHgEbGLs/7pre7n7PRzUO4Oa2wIYZp 7Wa36CRgTgbYbc7IX1FX04dxGVKyt/ToXbz+kXNiBhC2kpaudqJUOrIqvX89JIqrM8G+ GLbJ8qnSTfMQuRMDPMGT23I/7OPiUIwwGoCeUBGpcWlq8CJOhCjovB15Qt7YoXapLXnW ZHMG8yEBEWDC0pusv3f+s9Qtlkc3RRKtps+f9WaBrn3XDJvBMiue1pB/X+geHNb6zYX9 4xkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=q2lY7ZQSv+esrNgB1jQAYPPlaPDu0Ay2kOsBXvZtPbg=; b=YK9n6i71qZQ6up64oW62gk+V1h4/EZqfeUbXCOnvHc9UCrSA0PbW+ORSKrx8Wq37TX OMkpKVKK8To09ul/tQSPtM/HEYGrKvHhByzKpOY+EVwaQYI9wc1AG92d+SAwut8F4I9M IQ/+IXTqDQKBlUSjwVn2J95gcknU9x1ho+s2u8XAoWFuMiSGkemGZyM0RegAgRXbM3SF XPwn3Jr1AGs+4dc+RVv14/0uivkzBASThn9+n6nicI90fwfgY6FQD7XViru0cYS1X3oV noFZVDM6Mn9M+w98IFSwsSzb9V9XxHTwSdcvKLCVxaRBxZuZuUDeizS4tta5TpumP8Br AQyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O2SyUheW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6-v6si2082053pls.35.2018.02.06.11.21.09; Tue, 06 Feb 2018 11:21:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O2SyUheW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753055AbeBFTUE (ORCPT + 99 others); Tue, 6 Feb 2018 14:20:04 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36778 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbeBFTUC (ORCPT ); Tue, 6 Feb 2018 14:20:02 -0500 Received: by mail-pg0-f65.google.com with SMTP id x25so1494239pge.3; Tue, 06 Feb 2018 11:20:02 -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=q2lY7ZQSv+esrNgB1jQAYPPlaPDu0Ay2kOsBXvZtPbg=; b=O2SyUheWosFkpWjKG8Kgdmcfd+9VREM3bRl05swiclE+YHPhTypm+retl0q8ks4DsD M6xrzgn8+81ZzmP76epr/5hwwQwxET1LePF+F8xjT+V7M0X/phodG/P4vKpyMTw8ZrBl auD4TSi4OhSYslYJnuPJlvKF8pf96Abycwz9bnnsPAH3t/Qf/dRaBiefS8ck+k+isGJa +q5enAXjxApJqWZXp47DFWDEkYRlBexNM2wXSc4/ltHgau1PbpAxHDjxeAd/jja1sF0a RcfVpkaaQ9xOHekh33rSF4wirJCOsMVl9C/wjOjEo3u+bBVPUES2UK7jUZuwG7H2ypX0 F8ug== 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=q2lY7ZQSv+esrNgB1jQAYPPlaPDu0Ay2kOsBXvZtPbg=; b=BDQqOTWojqWwRsRJeO4X/5BgoCGJjkSi/QdAO5k2cvbt4Y471k644kj0sbssj70BJ7 SRXq27zZpVKOTLysZhgf3fP1FZNeJBsqC52hIrcJTMfEgynbyVU6ve3caCOWKn/7zbHY Vqo2b8/KB+mcNA97eRLDSnpj84FRC/f2iNTHB+izhYZcQt5boFMPpeNGwKvEzedm/Pzs 2sUZlvkTMH9J7ev3gTGmaLaFJDbUD/QFyCf7VE/2S13yVLrNUcx8ZWdvUwzfXM20SmcC LBDrmvyc+rJraywjWI32io94HtFZd3NF55dnT1K23P2vlWS4Gc+jqEDzNX2lBcaO7GGs h1zg== X-Gm-Message-State: APf1xPBQSVDn25Pgyn0TqtJKoTdFfIUevEwsEulCSGhugyJ9rZD/KV21 T9O5tald34CSP1BRzG24nemmvL2j X-Received: by 10.98.215.94 with SMTP id v30mr3471785pfl.106.1517944801762; Tue, 06 Feb 2018 11:20:01 -0800 (PST) Received: from mordor.localdomain ([49.205.217.87]) by smtp.gmail.com with ESMTPSA id x185sm22089565pfd.186.2018.02.06.11.19.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Feb 2018 11:20:01 -0800 (PST) Date: Wed, 7 Feb 2018 00:49:55 +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 v4] Documentation/ABI: update cpuidle sysfs documentation Message-ID: <20180206191955.GA19222@mordor.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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..e9ee67f80933 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 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