AMD has come a long way since 2002, but the Linux kernel still treats modern Threadrippers like Athlon-era systems—at least in one potentially lag-inducing respect.
AMD engineer Prateek Nayak recently submitted a patch to Linux’s processor idle drivers that would “skip dummy wait for processors based on the Zen microarchitecture.” When ACPI support was added to the Linux kernel in 2002—written by Andy Grover, committed by Linus Torvalds—it included a “dummy wait op.” The system essentially read data with no purpose other than delaying the next instruction until the CPU could fully stop with the STPCLK# command. This allowed for some power saving and compatibility during the early days of ACPI implementation when some chipsets wouldn’t move to an idle state when one would expect it.
But today’s Zen-based AMD chips don’t need this workaround, and, as Nayak writes, it’s hurting them, at least in specific workloads on Linux. Testing with instruction-based sampling (IBS) workloads shows that “a significant amount of time is spent in the dummy op, which incorrectly gets accounted as C-State residency.” The CPU, seeing all this low-effort dummy work, can push into deeper, slower C-State, which then makes the CPU take longer to “wake up,” especially on jobs that require lots of switching between busy and idle states.