From: Venkatesh Pallipadi Subject: [PATCH] cpufreq-stats driver documentation Date: Wed, 25 May 2005 14:43:56 -0700 Message-ID: <20050525144356.A9092@unix-os.sc.intel.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: cpufreq-bounces@lists.linux.org.uk Errors-To: cpufreq-bounces+glkc-cpufreq=gmane.org@lists.linux.org.uk Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dave Jones Cc: cpufreq@lists.linux.org.uk, Dominik Brodowski , Rajesh Shah Attached patch adds documentation for cpufreq-stats driver. Please apply. Thanks, Venki Documentation for cpufreq stats. Signed-off-by: Venkatesh Pallipadi diff -purN linux-2.6.12-rc4-mm2/Documentation/cpu-freq/cpufreq-stats.txt linux-2.6.12-rc4-mm2-ondemand/Documentation/cpu-freq/cpufreq-stats.txt --- linux-2.6.12-rc4-mm2/Documentation/cpu-freq/cpufreq-stats.txt 1969-12-31 16:00:00.000000000 -0800 +++ linux-2.6.12-rc4-mm2-ondemand/Documentation/cpu-freq/cpufreq-stats.txt 2005-05-19 01:55:25.282423160 -0700 @@ -0,0 +1,128 @@ + + CPU frequency and voltage scaling statictics in the Linux(TM) kernel + + + 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 - + + + Venkatesh Pallipadi + +Contents +1. Introduction +2. Statistics Provided (with example) +3. Configuring cpufreq-stats + + +1. Introduction + +cpufreq-stats is a driver that provices CPU frequency statistics for each CPU. +This statistics is provided in /sysfs as a bunch of read_only interfaces. This +interface (when configured) will appear in a seperate directory under cpufreq +in /sysfs (/devices/system/cpu/cpuX/cpufreq/stats/) for each CPU. +Various statistics will form read_only files under this directory. + +This driver is designed to be independent of any particular cpufreq_driver +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 + +All the statistics will be from the time the stats driver has been inserted +to the time when a read of a particular statistic is done. Obviously, stats +driver will not have any information about the the frequcny 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 .. +-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 +-------------------------------------------------------------------------------- + +- time_in_state +This gives the amount of time spent in each of the frequencies supported by +this CPU. The cat output will have "