amd does not have anywhere near the track record and involvement of Intel in contributing to Linux. This is evident in aspects such as certain bugs in the first two generations of Ryzen that have remained unresolved because the company decided not to get involved and simply said that they could be solved with software. This lack of habit when it comes to taking care of its support for Linux is also evident in a fix for chipsets from 20 years ago that is negatively impacting the performance of processors based on the Zen architecture (or at least Zen 3).
The flaw stemming from the 20-year-old chipset fix was discovered by K Prateek Nayak, an AMD engineer. Being more specific, the origin is in the inclusion of ACPI support in Linux 20 years ago, when a “dummy wait operation” had to be introduced to deal with some chipsets in which the STPCLK# (stop clock) signal is not possible. confirmed on time. The wait operation is a dummy read I/O that delays the processing of additional instructions until the processor stops completely.
The issue patched in 2002 was seen on some AMD Athlon systems with VIA chipsets, however it is not known to be present on newer chipsets and configurations.So, as K Prateek Nayak explains, “Sampling certain workloads with IBS (Instruction Based Sampling) on the AMD Zen 3 system shows that a significant amount of time is spent on dummy operation, which is incorrectly accounted for. as residence of C-State (states in which the CPU has reduced or disabled selected features).”
“A large C-State residency value can cause the ‘cpuidle’ governor to recommend a deeper C-State during subsequent idle instances, which initiates a vicious cycle that leads to performance degradation in workloads that rapidly switch between busy and idle phases”.
Dave Hansen, an Intel engineer contributing to Linux, has modified the patch introduced 20 years ago so that it works only on older systems that require it, thus avoiding harming newer processors. The patch has already been merged into Linux 6.0, so users of bleeding edge distributions like Arch Linux, Gentoo Fedora and openSUSE Tumbleeweed and MicroOS should get it shortly. It is also expected that companies like Red Hat, SUSE and Canonical (Ubuntu) will port it into their kernel implementations and that it will be ported back for introduction in at least Linux 5.15, for now the latest LTS release.
Luckily, the bug has been fixed and the fix should trickle down to users on supported systems via a standard update.