News: 0001651026

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Minor Optimization Coming For AMD Athlon XP Era Systems Running Linux

([Hardware] 6 Hours Ago Benefits CPUs With SSE, No SSE2)


A minor performance optimization is on the way to the Linux kernel for roughly two decade old CPUs that have SSE but lack SSE2. Among those CPUs to benefit are the AMD Athlon XP series, some early Sempron models, and some Intel Celeron and Pentium III models.

Open-source developer Yao Zi discovered in the write memory barrier (WMB) code to the Linux kernel for using the SFENCE Instruction it placed a constraint on the processor having SSE2. But the Store Fence (SFENCE) instruction was added in the original SSE, not SSE2. So a one-line patch is now working its way to the mainline kernel to adjust that SFENCE usage so processors with the original Streaming SIMD Extensions can use it rather than just SSE2.

"When adding cc clobber to wmb()'s definition, the alternative() condition to use sfence was incorrectly raised from X86_FEATURE_XMM to X86_FEATURE_XMM2.

Restore the correct constraint for potential better performance on machines without SSE2."

[1]The patch notes the potential for better performance albeit no performance benchmarks were actually done on such aging SSE-only CPUs.

[2]

The patch was picked up into tip/tip.git's x86/core Git branch and thus should be merged for the upcoming Linux 7.3 cycle. The patch is also marked for back-porting to existing stable Linux kernel series too.



[1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/core&id=d824ed1307680dd482f607b0e707c575f70668c4

[2] https://www.phoronix.com/image-viewer.php?id=2026&image=nf7_lrg



Understatement of the century:
"Hello everybody out there using minix - I'm doing a (free) operating
system (just a hobby, won't be big and professional like gnu) for
386(486) AT clones"

- Linus Torvalds, August 1991