Removing an Obsolete AMD Fix Makes Linux Kernel 6 Quicker
upstart writes:
Removing an obsolete AMD fix makes Linux kernel 6 quicker:
One of the joys of modern silicon chips is that power management is vitally important. It hasn't been about saving power or extending battery life since the 20th century. Processor vendors survive by selling us more and more transistors, solely on the basis that most of them are turned off most of the time - otherwise the chips would rapidly incinerate themselves, no matter how good their cooling.
This requires sophisticated interfaces between the OS and the hardware, and way back in 1996, a new standard called ACPI (Advanced Configuration and Power Interface) replaced the positively stone age APM (Advanced Power Management) from the Windows 3 era.
It was still a fancy new feature when The Reg reported on Linux on Itanic in 1999, and a worrying security issue in 2006. It's long been a problem for Linux because PC vendors mainly test against the industry-standard OS, which remains Windows. In 2003, Linus Torvalds - famed for his diplomacy - said:
ACPI is a complete design disaster in every way. But we're kind of stuck with it. If any Intel people are listening to this and you had anything to do with ACPI, shoot yourself now, before you reproduce.
This was a year after the Linux kernel gained ACPI support, and around then, a bug was found with some AMD Athlon machines that used VIA chipsets. When the kernel sent the STPCLK# signal to switch a CPU core to idle (although of course there was only one core in those days), the problematic machines took a while for it to happen, and so the kernel developers added some dummy I/O read instructions, just so that the processor wouldn't continue working when it was meant to be stopping. It improved compatibility and power management.
The problem is, as AMD engineer K Prateek Nayak found recently, that Linux still does it on AMD processors. He found the issue while studying the kernel's behavior with AMD's "Instruction-Based Sampling" toolkit. The issue it fixes is long gone, as are any 2002 Athlon PCs in production, we suspect.
Read more of this story at SoylentNews.