VOOZH about

URL: https://www.phoronix.com/news/AMD-INVLPGB-Linux-v8

⇱ AMD Broadcast TLB Invalidation Patches For Linux Updated, Intel RAR Eyed Next - Phoronix


👁 Phoronix

AMD Broadcast TLB Invalidation Patches For Linux Updated, Intel RAR Eyed Next

Written by Michael Larabel in AMD on 5 February 2025 at 10:29 AM EST. 1 Comment
One of the set of patches for the Linux kernel that we have been looking forward to but that wasn't wrapped up in time for the recent Linux v6.14 merge window was the work enabling use of the AMD INVLPGB instruction on Zen 3 CPUs and newer for broadcast TLB invalidation. This can lead to a nice performance bump in some workloads while the eighth iteration of those patches were posted overnight.

Rik van Riel with Meta has been working on using INVLPGB for invalidating TLB entries for a range of pages with broadcast. The INVLPGB instruction has been supported on AMD processors since the Zen 3 days but not yet leveraged by the Linux kernel. Back in December with the original patch series Rik posted some pretty intriguing results:

👁 INVLPGB benchmark


Following that I also carried out some benchmarks of these kernel patches on my own to also find some intriguing results: Benchmarking The AMD INVLPGB Linux Kernel Patches For Better Performance.

👁 AMD CPUs with a penguin


Now up to the eighth iteration of the patches, there's been a few fixes as well as some minor updates in hopefully getting the code queued up for the mainline kernel soon... With some luck, the AMD broadcast TLB invalidation work will be ready for the Linux 6.15 kernel cycle.

In the v8 patches, Rik noted the potential for working on a similar optimization for Intel CPUs too that would follow these AMD patches:
"My current plan is to implement support for Intel's RAR (Remote Action Request) TLB flushing in a follow-up series, after this thing has been merged into -tip. Making things any larger would just be unwieldy for reviewers."

Here's to hoping this AMD INVLPGB code will be ready to go for Linux 6.15.

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.