From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B895C34039 for ; Mon, 17 Feb 2020 16:20:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F9562464E for ; Mon, 17 Feb 2020 16:20:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581956456; bh=YoUDnme6ZhOeyE6o5qv1tql4wkcsHSN4WhqRofzhtNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gpaBxZpjPxiDTeZp5Z11wm9JFft+dLxmFWABWyTdStcKJlwky5howMkQbY43q6iDD SbpzN/VEgbtwQvRdDq0PDkhsV4sLzNW6Zag3M1SH53VRTAIxytySv7+FmAbThKEq6B aBxZVtUn+cwNQNgW+su5JXR3gevQGggNejVcUjLU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729141AbgBQQUz (ORCPT ); Mon, 17 Feb 2020 11:20:55 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55400 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728650AbgBQQUw (ORCPT ); Mon, 17 Feb 2020 11:20:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=us6g+pLPgZnPltIkGwqckqzYPJOrfV1h6bZ6PwDN8Os=; b=C2wSJw/HTd66nJe1+s6lriAanZ 5Duv6+4jKhE7Huz3MwT4rAc8TPbgGC4TGHybq8ayVIwtzXRF7fl2bi2YZy6sP//fR5oepOE066d+0 /dh6FePuJ1NBTcVfIyJ/G5owRO+aUaoFFqdZUo8n2plIA4urDtONpaOCYpUc9LkG31JGf1mklKO9B BJCClVr9HzUA4iSaDR1vCDm9hCSpyeFe7oai2kxC4P6k89B0F5wAaL4KVTwof28HBtaJj1AEWeRt/ m8v8SAe850IRKhIQmycm657t7e80xUdpcMh5BsPAz7pwbEgGSfNwOJhZQvAUoOfOBHa99qPfhqkuN O/F3qiwQ==; Received: from tmo-109-126.customers.d1-online.com ([80.187.109.126] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3j8Y-00042I-BP; Mon, 17 Feb 2020 16:20:51 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92.3) (envelope-from ) id 1j3j8W-000fq5-Dl; Mon, 17 Feb 2020 17:20:44 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Jonathan Corbet , "Rafael J. Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org Subject: [PATCH v2 19/24] docs: cpu-freq: convert cpufreq-stats.txt to ReST Date: Mon, 17 Feb 2020 17:20:37 +0100 Message-Id: <75c274d922cc211b717e117f4b982c9b67820373.1581956285.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 "