~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/cpu-freq/cpufreq-stats.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/cpu-freq/cpufreq-stats.rst (Version linux-6.12-rc7) and /Documentation/cpu-freq/cpufreq-stats.rst (Version linux-4.15.18)


  1 .. SPDX-License-Identifier: GPL-2.0               
  2                                                   
  3 ==========================================        
  4 General Description of sysfs CPUFreq Stats        
  5 ==========================================        
  6                                                   
  7 information for users                             
  8                                                   
  9                                                   
 10 Author: Venkatesh Pallipadi <venkatesh.pallipad    
 11                                                   
 12 .. Contents                                       
 13                                                   
 14    1. Introduction                                
 15    2. Statistics Provided (with example)          
 16    3. Configuring cpufreq-stats                   
 17                                                   
 18                                                   
 19 1. Introduction                                   
 20 ===============                                   
 21                                                   
 22 cpufreq-stats is a driver that provides CPU fr    
 23 These statistics are provided in /sysfs as a b    
 24 interface (when configured) will appear in a s    
 25 in /sysfs (<sysfs root>/devices/system/cpu/cpu    
 26 Various statistics will form read_only files u    
 27                                                   
 28 This driver is designed to be independent of a    
 29 that may be running on your CPU. So, it will w    
 30                                                   
 31                                                   
 32 2. Statistics Provided (with example)             
 33 =====================================             
 34                                                   
 35 cpufreq stats provides following statistics (e    
 36                                                   
 37 -  time_in_state                                  
 38 -  total_trans                                    
 39 -  trans_table                                    
 40                                                   
 41 All the statistics will be from the time the s    
 42 (or the time the stats were reset) to the time    
 43 statistic is done. Obviously, stats driver wil    
 44 about the frequency transitions before the sta    
 45                                                   
 46 ::                                                
 47                                                   
 48     <mysystem>:/sys/devices/system/cpu/cpu0/cp    
 49     total 0                                       
 50     drwxr-xr-x  2 root root    0 May 14 16:06     
 51     drwxr-xr-x  3 root root    0 May 14 15:58     
 52     --w-------  1 root root 4096 May 14 16:06     
 53     -r--r--r--  1 root root 4096 May 14 16:06     
 54     -r--r--r--  1 root root 4096 May 14 16:06     
 55     -r--r--r--  1 root root 4096 May 14 16:06     
 56                                                   
 57 - **reset**                                       
 58                                                   
 59 Write-only attribute that can be used to reset    
 60 useful for evaluating system behaviour under d    
 61 need for a reboot.                                
 62                                                   
 63 - **time_in_state**                               
 64                                                   
 65 This gives the amount of time spent in each of    
 66 this CPU. The cat output will have "<frequency    
 67 will mean this CPU spent <time> usertime units    
 68 will have one line for each of the supported f    
 69 is 10mS (similar to other time exported in /pr    
 70                                                   
 71 ::                                                
 72                                                   
 73     <mysystem>:/sys/devices/system/cpu/cpu0/cp    
 74     3600000 2089                                  
 75     3400000 136                                   
 76     3200000 34                                    
 77     3000000 67                                    
 78     2800000 172488                                
 79                                                   
 80                                                   
 81 - **total_trans**                                 
 82                                                   
 83 This gives the total number of frequency trans    
 84 output will have a single count which is the t    
 85 transitions.                                      
 86                                                   
 87 ::                                                
 88                                                   
 89     <mysystem>:/sys/devices/system/cpu/cpu0/cp    
 90     20                                            
 91                                                   
 92 - **trans_table**                                 
 93                                                   
 94 This will give a fine grained information abou    
 95 transitions. The cat output here is a two dime    
 96 <i,j> (row i, column j) represents the count o    
 97 Freq_i to Freq_j. Freq_i rows and Freq_j colum    
 98 which the driver has provided the frequency ta    
 99 and so can be sorted (ascending or descending)    
100 also contains the actual freq values for each     
101 readability.                                      
102                                                   
103 If the transition table is bigger than PAGE_SI    
104 return an -EFBIG error.                           
105                                                   
106 ::                                                
107                                                   
108     <mysystem>:/sys/devices/system/cpu/cpu0/cp    
109     From  :    To                                 
110             :   3600000   3400000   3200000       
111     3600000:         0         5         0        
112     3400000:         4         0         2        
113     3200000:         0         1         0        
114     3000000:         0         0         1        
115     2800000:         0         0         0        
116                                                   
117 3. Configuring cpufreq-stats                      
118 ============================                      
119                                                   
120 To configure cpufreq-stats in your kernel::       
121                                                   
122         Config Main Menu                          
123                 Power management options (ACPI    
124                         CPU Frequency scaling     
125                                 [*] CPU Freque    
126                                 [*]   CPU freq    
127                                                   
128                                                   
129 "CPU Frequency scaling" (CONFIG_CPU_FREQ) shou    
130 cpufreq-stats.                                    
131                                                   
132 "CPU frequency translation statistics" (CONFIG    
133 statistics which includes time_in_state, total    
134                                                   
135 Once this option is enabled and your CPU suppo    
136 will be able to see the CPU frequency statisti    
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php