Received: by 10.223.176.46 with SMTP id f43csp4322789wra; Tue, 23 Jan 2018 07:45:06 -0800 (PST) X-Google-Smtp-Source: AH8x224KUHVvsw6Kk0w10I3XF2Jr5aHRAkeLzPnU92coOrW2rYXf7hxwH65ahJi1BbsME7dMxSqb X-Received: by 10.107.35.85 with SMTP id j82mr4030144ioj.253.1516722306737; Tue, 23 Jan 2018 07:45:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516722306; cv=none; d=google.com; s=arc-20160816; b=C2xJ4wUnhMbGxYNmJemKY06Pi7f5pwDGZSuG/7l3QqMRLySTZH4S3mN4GscONFiRc0 qei5/PvulkWNtcIQjDWU25FfrKbBeky5Ro4p8YXHyWzXgLnKijFpz/42/Q+GbtJgDS3q oCFUlqtEHD1P/K/5beU5apJ8vtHNKJ7MCT0GsYOqxgIrvP1xbZ1ZUYwdgm/Yw2fjDb3y j/KehVguTcVY9tRX1EX26lwaGql+G7gkrVBxC8xTw04n/VgFDFzXK0xT8B0EgPtsuEJw cXwWOatqC6OGGxfAPwjcYDGIoe0adWi8C94dg/yNwRWuB4lRAyqqgXhu/NU0TMB07aSQ FZag== 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=GIuAQdqmFRTF+tHcWDwxOkdcXvZeb4yUD/m+ku/6sRQ=; b=yDsAQbf8FYM3lbwAhdVJJG/+WyL5KH2lmwzI/5r0C6oT559SBV8jUmEOeaDsIi91PO 5cI50V8hgt/KqD6u8ZFOxqOF1G9RP6LTX/hfkw76acIVAsvWHa4aXsXuHVj2FXPQVd8u vyZeXCE5AdOBuIRGO5sLr1mTNd8ak2SjklWnXUxbAm4wtPfcSQ3p7lyEaM+pY2sRr6na svzlxsWu/ad/Zd0RhpxKpt1Ynb8sLJk/3HHESuLti8fXxy1iRTBFbpWfXIkK6152JOpQ yzeXsyApuXE1iXq4f+NJd7/HYG77OcWGDx+FQAY3DjMgwfY8193Xz7rgcIL1PPfxcoS7 ADLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u8mEeptR; 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 c6si8936413ite.79.2018.01.23.07.44.53; Tue, 23 Jan 2018 07:45:06 -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=u8mEeptR; 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 S1752079AbeAWPod (ORCPT + 99 others); Tue, 23 Jan 2018 10:44:33 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:41862 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751777AbeAWPo3 (ORCPT ); Tue, 23 Jan 2018 10:44:29 -0500 Received: by mail-pf0-f196.google.com with SMTP id c6so605953pfi.8; Tue, 23 Jan 2018 07:44:29 -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=GIuAQdqmFRTF+tHcWDwxOkdcXvZeb4yUD/m+ku/6sRQ=; b=u8mEeptRJWPY4YWb/muJVAACRli8jtS7lFKFcZovYOuQbJgmGS82bLv3i3yB9yoK7w dcIJyl3+f/ZMDZe3nLAEYswQTUMwfFYjhHon6PIB0VAgBW3fy3OE/OOSHYf39FRV705O kL2z2PucB/56BXsSk0O1eHlNwRxaelbKI1b2UYqUewrLYDcWYeYiYfS+WznN6raExwfX vl7eTeUJJfrBxE9w4Mc30Svrei8eDNP8RNg616jqMGaHCEiaNobvutuf9P4nm5nQ3viq 7mSofN44aCuUpxkklL+dJyBUjy9G8apGMSsGkqM504+9NC6YMdy86xNYDgU3BL8Ctfht joWw== 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=GIuAQdqmFRTF+tHcWDwxOkdcXvZeb4yUD/m+ku/6sRQ=; b=riDPBh2jRaur1JZWZXYx5rfqg47+jbdgoDMv9OpHMQCVl1ZWTNSNP+kkmMjmE3PzhW r7ZPLOWbzvn97V2s4lfMCicCLSgP5pVHXDfvZ936jWDQzetC5aIxppOPM/aYPbPA4/NY YGpQHeafmHDqJMmKGkXYekaHctwWNe04rt9icIyBemciSi5++liby2czdkIjYtLQK7wN PtgON00uQLHlr9yIn9kv3QpawUyRklDOqTnB9Zfgsx0tmIm6rZv2/P33dSwqLsms+Sg8 zFy/+T9jtlJghqXmWnKCaxNkoZV+m+UH+Yqg3uwGMDuPoD5qraXf5gFqH5K52VbZtOMZ UqeA== X-Gm-Message-State: AKwxytepZp5L5jh88Gcc9pyRyCIp7D+AOFHJ5yjwt03A5/m0yLVsaX77 JDYxzw6ao/0Xp16XgyBzk0w= X-Received: by 2002:a17:902:6c:: with SMTP id 99-v6mr3938685pla.409.1516722269019; Tue, 23 Jan 2018 07:44:29 -0800 (PST) Received: from mordor.localdomain ([49.205.216.57]) by smtp.gmail.com with ESMTPSA id o135sm6047657pfg.161.2018.01.23.07.44.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jan 2018 07:44:28 -0800 (PST) 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) 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 --- 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