Removing an obsolete AMD fix makes Linux kernel 6 quicker

An ancient fix for power management issues on AMD systems has been reducing Linux's performance since 2002. Now it's gone.

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:

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.

The result has been a hasty patch by Intel's Dave Hansen, which doesn't remove the workaround but limits it to Intel chips, where it shouldn't cause any problem as they use a different method to switch to idle.

Hansen explains:

His patch links to some benchmark numbers, but the bottom line is that the minimum throughput increases by about 14 times, and the mean throughput by just over a half.

Although kernel 6.0 is due on Sunday, the patch has already been accepted and should be included. It will be interesting to find out how much difference it makes in real-world performance.

In an era where mitigations for modern CPU problems can reduce performance by 70 per cent - although if you like to live dangerously, you can turn them off - removing obsolete fixes to give some speed back is very welcome indeed. ®

Search
About Us
Website HardCracked provides softwares, patches, cracks and keygens. If you have software or keygens to share, feel free to submit it to us here. Also you may contact us if you have software that needs to be removed from our website. Thanks for use our service!
IT News
Dec 3
OpenAI tweaks ChatGPT to avoid dangerous AI information

In brief Plus: DeepMind beats humans at Stratego

Dec 3
Google says Android runs better when covered in Rust

Banishing memory safety bugs cuts critical vulnerabilities

Dec 2
Google frees nifty ML image-compression model... but it's for JPEG-XL

Yep. The very same JPEG-XL that's just been axed from Chromium

Dec 2
Blockchain needs a reason to exist, Boris Johnson tells roomful of blockchain pros

As for Twitter, politicians need to grow thick skins and stop mistaking it for advertisement

Dec 2
DoJ worries messaging apps could hide evidence of crime, corruption

Record keeping rules might need a tweak to ensure content is preserved

Dec 1
Microsoft adds silicon muscle into latest Azure SQL database configs

Intel's 'Ice Lake' and AMD's 'Milan' chips bump up speeds and feeds

Dec 1
.NET open source is 'heavily under-funded' says AWS

RE:INVENT Amazon web arm investing in Microsoft's platform to help customers escape Windows