From patchwork Tue Mar 3 13:52:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 11418133 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B9BA930 for ; Tue, 3 Mar 2020 13:52:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23392215A4 for ; Tue, 3 Mar 2020 13:52:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583243533; bh=objKVpKHw0GyOrZuwLkpij67clPs3E6Zb+U1ueoSZWY=; h=From:Cc:Subject:Date:In-Reply-To:References:To:List-ID:From; b=euw9z1AYHlrPjGvvQQM4ZFWfwUnyarB2/QP+SBcc59B9g+l3ajwa99cqbcFaZaoeJ NhI2u2WiWbn0D2NHdQPGHcJxFU2Az8326XbhAqsx+9SujfJRMkLASPCc57K6kRXbRt E0b2g/YCGegyYdSsrctM7xpY98I9rs4dlZTyFXZM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729058AbgCCNwM (ORCPT ); Tue, 3 Mar 2020 08:52:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:40404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728941AbgCCNwM (ORCPT ); Tue, 3 Mar 2020 08:52:12 -0500 Received: from mail.kernel.org (tmo-101-56.customers.d1-online.com [80.187.101.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 75C162086A; Tue, 3 Mar 2020 13:52:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583243530; bh=objKVpKHw0GyOrZuwLkpij67clPs3E6Zb+U1ueoSZWY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BD8Rrg8AuHeVmvtkjR0+0XIscuz8H+qsnA4wM5KNS7+1NmyNf9P6Gj1yh6dGv3VPZ dTd0/sviH59zAiFXyvDH1ktWnSkFZMYrH8FKhFMefWNOteNLoE75zqzvr+afxoUzeC dZ3l2G+GzTShyJ70k6yUV7rbPTma66owwp4NwIrs= Received: from mchehab by mail.kernel.org with local (Exim 4.92.3) (envelope-from ) id 1j97xw-001YXe-8m; Tue, 03 Mar 2020 14:52:08 +0100 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , "Rafael J. Wysocki" , Viresh Kumar , Jonathan Corbet , linux-pm@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v2 5/5] docs: cpu-freq: convert cpufreq-stats.txt to ReST Date: Tue, 3 Mar 2020 14:52:06 +0100 Message-Id: <71273e4caef915672dc85746db020bdb44f92dac.1583243272.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: References: MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org - Add a SPDX header; - Add a document title, based on the original contents of cpu-freq/index.txt; - Use lists where needed; - Comment out the existing text-only index; - Adjust some title marks; - Use bold on some places; - Mark literal blocks as such; - Some whitespace fixes and new line breaks; - Add it to cpu-freq/index.rst. Signed-off-by: Mauro Carvalho Chehab --- .../{cpufreq-stats.txt => cpufreq-stats.rst} | 121 ++++++++++-------- Documentation/cpu-freq/index.rst | 1 + 2 files changed, 66 insertions(+), 56 deletions(-) rename Documentation/cpu-freq/{cpufreq-stats.txt => cpufreq-stats.rst} (53%) diff --git a/Documentation/cpu-freq/cpufreq-stats.txt b/Documentation/cpu-freq/cpufreq-stats.rst similarity index 53% rename from Documentation/cpu-freq/cpufreq-stats.txt rename to Documentation/cpu-freq/cpufreq-stats.rst index 14378cecb172..9ad695b1c7db 100644 --- a/Documentation/cpu-freq/cpufreq-stats.txt +++ b/Documentation/cpu-freq/cpufreq-stats.rst @@ -1,21 +1,23 @@ +.. SPDX-License-Identifier: GPL-2.0 - CPU frequency and voltage scaling statistics in the Linux(TM) kernel +========================================== +General Description of sysfs CPUFreq Stats +========================================== +information for users - L i n u x c p u f r e q - s t a t s d r i v e r - - information for users - +Author: Venkatesh Pallipadi +.. Contents - Venkatesh Pallipadi - -Contents -1. Introduction -2. Statistics Provided (with example) -3. Configuring cpufreq-stats + 1. Introduction + 2. Statistics Provided (with example) + 3. Configuring cpufreq-stats 1. Introduction +=============== cpufreq-stats is a driver that provides CPU frequency statistics for each CPU. These statistics are provided in /sysfs as a bunch of read_only interfaces. This @@ -28,8 +30,10 @@ that may be running on your CPU. So, it will work with any cpufreq_driver. 2. Statistics Provided (with example) +===================================== cpufreq stats provides following statistics (explained in detail below). + - time_in_state - total_trans - trans_table @@ -39,53 +43,57 @@ All the statistics will be from the time the stats driver has been inserted statistic is done. Obviously, stats driver will not have any information about the frequency transitions before the stats driver insertion. --------------------------------------------------------------------------------- -:/sys/devices/system/cpu/cpu0/cpufreq/stats # ls -l -total 0 -drwxr-xr-x 2 root root 0 May 14 16:06 . -drwxr-xr-x 3 root root 0 May 14 15:58 .. ---w------- 1 root root 4096 May 14 16:06 reset --r--r--r-- 1 root root 4096 May 14 16:06 time_in_state --r--r--r-- 1 root root 4096 May 14 16:06 total_trans --r--r--r-- 1 root root 4096 May 14 16:06 trans_table --------------------------------------------------------------------------------- +:: + + :/sys/devices/system/cpu/cpu0/cpufreq/stats # ls -l + total 0 + drwxr-xr-x 2 root root 0 May 14 16:06 . + drwxr-xr-x 3 root root 0 May 14 15:58 .. + --w------- 1 root root 4096 May 14 16:06 reset + -r--r--r-- 1 root root 4096 May 14 16:06 time_in_state + -r--r--r-- 1 root root 4096 May 14 16:06 total_trans + -r--r--r-- 1 root root 4096 May 14 16:06 trans_table + +- **reset** -- reset Write-only attribute that can be used to reset the stat counters. This can be useful for evaluating system behaviour under different governors without the need for a reboot. -- time_in_state +- **time_in_state** + This gives the amount of time spent in each of the frequencies supported by this CPU. The cat output will have "