VOOZH about

URL: https://www.phoronix.com/news/Linux-7.1-x86-asm

⇱ Linux 7.1 Gets Rid Of Some Unnecessary Memory Clobbers - Phoronix


👁 Phoronix

Linux 7.1 Gets Rid Of Some Unnecessary Memory Clobbers

Written by Michael Larabel in Linux Kernel on 15 April 2026 at 06:25 AM EDT. Add A Comment
The x86/asm changes merged yesterday for the Linux 7.1 kernel with a few low-level improvements.

Uros Bizjak worked out a few of the x86/x86_64 Assembly improvements for the Linux 7.1 kernel. For the most part it's uneventful work this cycle but there are two patches for removing some unnecessary memory clobbers. Avoiding the memory clobbers from the inline Assembly code can be useful for minor impact to better instruction scheduling and register allocation. The memory clobbers act as a read/write memory barrier to prevent the compiler from reordering memory loads/stores from the inline Assembly statement and to flush any values cached in registers back to memory as well as reloading values cached in registers that may have been changed in the Assembly code.

Bizjak found the memory clobber to act as a compiler barrier is unnecessary from the kernel's FS/GS base accessors as they are only reading the FS/GS base MSRs into a general purpose register and not accessing memory. The other patch removes a memory clobber from savesegment() since it too is not accessing memory and avoids the need to declare a memory clobber.

That's the highlight of the x86/asm pull request now merged for Linux 7.1.

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.