20-year-old Linux workaround is still slowing down AMD systems - Ars Technica

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.

Nayak ran tests in tbench on a dual-socket Zen3 system against the baseline Linux kernel, a kernel with the C2 state entirely disabled, and a kernel with the dummy wait operation patched out.

His solution was to limit "dummy wait" to Intel systems, where it would not affect "remotely modern Intel systems," and add comments to the kernel's idle drivers that spell out what's happening—and encourage those reading to "consider moving your system to a more modern idle mechanism.".

If an urgent patch removing or limiting "dummy wait" is submitted this week, it could likely make the Linux 6.0 kernel, which Torvalds expects to ship next week.

Back to 365NEWSX