Skip to content

Commit 8d72ee3

Browse files
vireshkrafaeljw
authored andcommitted
Documentation: cpu-freq: Frequencies aren't always sorted
The order in which the frequencies are displayed in cpufreq stats depends on the order in which the frequencies were sorted in the frequency table provided to cpufreq core by the cpufreq driver. They can be completely unsorted as well. The documentation's claim that the stats will be sorted in descending order is hence incorrect and here is an attempt to fix it. Reported-by: Pavel <pavel2000@ngs.ru> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 6510223 commit 8d72ee3

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎Documentation/cpu-freq/cpufreq-stats.txt‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ transitions.
8686
This will give a fine grained information about all the CPU frequency
8787
transitions. The cat output here is a two dimensional matrix, where an entry
8888
<i,j> (row i, column j) represents the count of number of transitions from
89-
Freq_i to Freq_j. Freq_i is in descending order with increasing rows and
90-
Freq_j is in descending order with increasing columns. The output here also
91-
contains the actual freq values for each row and column for better readability.
89+
Freq_i to Freq_j. Freq_i rows and Freq_j columns follow the sorting order in
90+
which the driver has provided the frequency table initially to the cpufreq core
91+
and so can be sorted (ascending or descending) or unsorted. The output here
92+
also contains the actual freq values for each row and column for better
93+
readability.
9294

9395
If the transition table is bigger than PAGE_SIZE, reading this will
9496
return an -EFBIG error.

0 commit comments

Comments
 (0)