FS#69817 - [linux] /proc/cpuinfo misreporting frequency
Attached to Project:
Arch Linux
Opened by Daniel (weker01) - Saturday, 27 February 2021, 19:37 GMT
Last edited by Jan Alexander Steffens (heftig) - Tuesday, 09 March 2021, 22:21 GMT
Opened by Daniel (weker01) - Saturday, 27 February 2021, 19:37 GMT
Last edited by Jan Alexander Steffens (heftig) - Tuesday, 09 March 2021, 22:21 GMT
|
Details
Description:
I sometimes monitor my cpu freqs of my Ryzen 9 3900X with: `watch -n0.4 'grep MHz /proc/cpuinfo | sort -nr'` After the 5.11.1 kernel update I compiled something large and was bored so went and looked at what my cpu was doing. To my suprise it magically boosted to 6078 MHz with one core! While all other cores where @ 2200 MHz without moving.... This can't be right normally my cpu only boosted to 4.5 GHz max and only for a few ms.... I think it maybe is related to the new [Frequency Invariance Support](https://www.phoronix.com/scan.php?page=news_item&px=AMD-Freq-Invariance-Linux-5.11)? I created a [reddit thread](https://www.reddit.com/r/archlinux/comments/lrnyki/proccpuinfo_reporting_bogus_frequencies_on_zen2/) where this bug was also confirmed for zen3 cpus and someone that reported that gentoo linux 5.11.1 doesn't have this problem. It is worth mentioning that changing the cpufreq scaling_governor does not fix the misreporting as setting: `echo performance > /sys/devices/system/cpu/cpufreq/policy*/scaling_governor` leads to multiple cores going >5GHz. Attached you will find a cpuinfo snapshot with cpufreq scaling_governor performance that exhibits this behavior. Additional info: * package version(s): linux 5.11.1.arch1-1 linux 5.11.2.arch1-1 Steps to reproduce: Execute `watch -n0.4 'grep MHz /proc/cpuinfo | sort -nr'` and observe extreme overclocking frequencies. |
This task depends upon
Closed by Jan Alexander Steffens (heftig)
Tuesday, 09 March 2021, 22:21 GMT
Reason for closing: Fixed
Additional comments about closing: linux 5.11.3.arch1-1
Tuesday, 09 March 2021, 22:21 GMT
Reason for closing: Fixed
Additional comments about closing: linux 5.11.3.arch1-1
Edit:
Upstream bug report [2].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=538b0188da4653b9f4511a114f014354fb6fb7a5
[2] https://bugzilla.kernel.org/show_bug.cgi?id=211791
I am afraid I do not currently know how to safely patch & build the linux kernel with arch's buildsystem, so no I did not try the recommended patch...
but will try later today hopefully. (My kernel building skills are a bit rusty, long time no gentoo ;)
I think I can confirm that [1] which is the latest patch in the upstream bug report [2] works!
Although the behavior is rather strange as the frequencies don't jump around anymore like they did on <5.10 but I guess this is expected as there was some work done on the freq subsystem around Zen but no strange > 6GHz spikes!
[1] https://bugzilla.kernel.org/attachment.cgi?id=295295&action=diff
[2] https://bugzilla.kernel.org/show_bug.cgi?id=211305
[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/commit/queue-5.11/cpufreq-acpi-set-cpuinfo.max_freq-directly-if-max-boost-is-known.patch?id=b27255455dd28f75941ae631f2ba9f8f3edea9d9