-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ryzen & TSC bugs #16545
Comments
I have patched my Linux kernel with patches available in [1] and [4] (just in case) and now kernel can set current clocksource as tsc at boot. TSC even stayed after some sleep/wake cycles. I can confirm that with TSC some old problematic releases (#16382) are more or less fine. Also frame times are more stable with TSC while CPU usage sometimes is notably lower.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quick summary
I found new information about Ryzen and tsc.
To continue discussion started in #16382, related to #16240 and #16499
Details
This is obviously not RPCS3 bug, but rather known for years bugs in some zen CPUs. Notably two different problems usually reported by Ryzen users:
tsc: Marking TSC unstable due to clocksource watchdog
. Can be "fixed" by the user doing opposed reboot type or addingtsc=reliable
or evenhpet=disable tsc=reliable clocksource=tsc nmi_watchdog=0 nowatchdog
to kernel params in bootloader.tsc: Marking TSC unstable due to check_tsc_sync_source failed
. Require firmware update[1][2].The problem with the second one is that some vendors just ignore older models or (in case of Lenovo) provide Linux support to some limited model list[3]. So it's unclear if some models will be ever fixed, while others already was fixed in newer bios updates.
RPCS3 currently have problematic TSC code disabled, but maybe it would be better to dynamically disable that if current clocksource is not tsc. Or even have an configuration option. Otherwise this issue can be safely closed as 'Not our bug'.
[1] https://bugzilla.kernel.org/show_bug.cgi?id=202525
[2] https://bugzilla.kernel.org/show_bug.cgi?id=216161
[3] https://forums.lenovo.com/topic/findpost/27/5090932/5822354
[4] https://lore.kernel.org/all/[email protected]/
Some general info about zen1 & zen+ CPUs
https://www.agner.org/optimize/blog/read.php?i=838 (context: zen1 & zen+)
Not important, but just in case
see https://en.wikipedia.org/wiki/FMA_instruction_set#FMA4_instruction_set
I can't measure CPU freqs precisely (due to lack of CPPC (Collaborative Processor Performance Control) support (?)) but I saw some screenshots from AMD official Ryzen Master tool for Windows that some cores can reach almost zero Mhz.
Well, I can see that some heavy tasks are starting from lower than minimal frequency, while by default monitoring constantly showing just minimal frequency if there is no load.
I read info from the first link very briefly, but I guess it's possible to use one of known third party kernel drivers rather then custom one mentioned in the article.
https://github.com/leogx9r/ryzen_smu (and forks)
https://github.com/ocerman/zenpower (and forks)
https://github.com/FlyGoat/RyzenAdj
Likely most of them require root if able to modify some system parameters.
But just more info to add.
Also: https://www.hwinfo.com/forum/threads/effective-clock-vs-instant-discrete-clock.5958/
something about "Effective clock"
I hope this information will help somehow.
The text was updated successfully, but these errors were encountered: