AMD has arrived A long way since 2002but the Linux kernel still treats modern Threadrippers like Athlon-era systems – at least one potential lag-introducer.
Recently AMD engineer Prateek Nayak Provided a patch to Linux processor junk drivers it will “skip the dummy wait for processors based on the Zen microarchitecture”. When ACPI support was added to the Linux kernel in 2002 – written by Andy Grover, written by Linus Torvalds – it included a “dummy wait op”. The system reads data for no other purpose than to delay the next instruction until the CPU can come to a full stop with the STPCLK # command. This allowed for some power savings and compatibility in the early days of ACPI when some chipsets would not idle when expected.
But today’s Zen-based AMD chips don’t need this solution, and as Nayak writes, it hurts them, at least on Linux-specific workloads. Tests with instruction-based sampling (IBS) workloads show that “significant amounts of time are spent on dummy ops that are mistakenly assumed to be C-State residency.” Doing all this low-effort dummy work, the CPU can go into a deeper, slower C-State, which takes longer for the CPU to “wake up”, especially in jobs that require many transitions between busy and idle states. .
Nayak conducted tests the bench on a dual-socket Zen3 system against a base Linux kernel, a kernel with a completely disabled kernel and dummy wait operation in the C2 state. Its patched version has a 1,390 percent increase in minimum MB/s throughput and a 51 percent increase in average MB/s compared to the base kernel, often just behind C2 completely disabled.
Intel systems have avoided AMD’s old curse because they’ve been using a MWAIT-based system for at least a decade. According to the Phoronix blog. It caused this Emergency patch provided by Intel’s Dave Hansen. His solution was to limit the “healthy wait” to Intel systems, where it would not affect “remotely modern Intel systems”, and to add comments to the kernel’s idle drivers explaining what was happening and encouraging readers to “consider moving the system elsewhere”. a more modern idle mechanism.”
If an emergency patch that removes or limits the “dummy wait” is released this week, it will likely make the Linux 6.0 kernel. Torvalds expects to ship next week.