AMD engineer K Prateek Nayak recently discovered that a 20-year-old chipset workaround in the Linux kernel is still used in modern AMD systems, and in some cases hurts the performance of modern Zen hardware.and proposes a relatedpatchaimed atLimit this workaround to legacy systemsthereby helping to improve the performance of modern systems.

According to the introduction, since ACPI support was added to the Linux kernel in 2002, there has been a “dummy wait op” to deal with some chipsets’ STPCLK# not being processed in a timely manner. This dummy I/O read delays further instruction processing until the CPU stops completely. “At least in some AMD Athlon era systems with VIA chipsets this was an issue…but not for newer chipsets from the last two decades or so“.

K Prateek Nayak states:

Sampling some workloads with IBS on AMD Zen3 systems shows that a significant amount of time is spent in dummy ops, which are erroneously seen as C-State residency. A large C-State residency value can cause the cpuidle governor to recommend a deeper C-State during subsequent idle instances, starting a vicious cycle that results in performance degradation for workloads that rapidly switch between busy and idle phases.

One of the workloads is tbench, where a large performance drop can be observed during some runs.

So at least for Tbench, this long-term, unconditional workaround in the Linux kernel has been hurting AMD Ryzen/Threadripper/EPYC performance in certain workloads:

It does not affect modern Intel systems though, as newer Intel platforms use the MWAIT-based intel_idle driver code path instead.

It’s worth mentioning that Intel Linux engineer Dave Hansen worked on K Prateek Nayak’s patch furthersimplify.The patch will not apply this “dummy wait” workaround, so AMD systems will forgo this action that degrades performance on modern systems. This patch has now been merged into Linux 6.0 as part of the x86/urgent fix.

#20YearOld #Chipset #Solutions #Hurting #Modern #AMD #Linux #Systems

Leave a Comment

Your email address will not be published. Required fields are marked *