summaryrefslogtreecommitdiffstats
path: root/Documentation/cpu-freq
diff options
context:
space:
mode:
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>2017-11-07 09:09:29 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-11-08 23:41:25 +0100
commitf7bc9b209e27c0b617378400136cc663a6314d0c (patch)
treeb54c5275965162f7df59cdf84c0c1ff82c7f87b4 /Documentation/cpu-freq
parentcpufreq: arm_big_little: make cpufreq_arm_bL_ops structures const (diff)
downloadlinux-f7bc9b209e27c0b617378400136cc663a6314d0c.tar.xz
linux-f7bc9b209e27c0b617378400136cc663a6314d0c.zip
cpufreq: stats: Handle the case when trans_table goes beyond PAGE_SIZE
On platforms with large number of Pstates, the transition table, which is a NxN matrix, can overflow beyond the PAGE_SIZE boundary. This can be seen on POWER9 which has 100+ Pstates. As a result, each time the trans_table is read for any of the CPUs, we will get the following error. --------------------------------------------------- fill_read_buffer: show+0x0/0xa0 returned bad count --------------------------------------------------- This patch ensures that in case of an overflow, we print a warning once in the dmesg and return FILE TOO LARGE error for this and all subsequent accesses of trans_table. Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/cpu-freq')
-rw-r--r--Documentation/cpu-freq/cpufreq-stats.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/cpu-freq/cpufreq-stats.txt b/Documentation/cpu-freq/cpufreq-stats.txt
index 2bbe207354ed..a873855c811d 100644
--- a/Documentation/cpu-freq/cpufreq-stats.txt
+++ b/Documentation/cpu-freq/cpufreq-stats.txt
@@ -90,6 +90,9 @@ Freq_i to Freq_j. Freq_i is in descending order with increasing rows and
Freq_j is in descending order with increasing columns. The output here also
contains the actual freq values for each row and column for better readability.
+If the transition table is bigger than PAGE_SIZE, reading this will
+return an -EFBIG error.
+
--------------------------------------------------------------------------------
<mysystem>:/sys/devices/system/cpu/cpu0/cpufreq/stats # cat trans_table
From : To