VOOZH about

URL: https://www.phoronix.com/news/Linux-Fixes-TLB-Flush-Skipping

⇱ Linux Lands Fix For Some TLB Flushes Being Inadvertently Skipped - Phoronix


👁 Phoronix

Linux Lands Fix For Some TLB Flushes Being Inadvertently Skipped

Written by Michael Larabel in Linux Kernel on 10 May 2025 at 05:35 AM EDT. Add A Comment
Merged yesterday to Linux 6.15 Git and marked for back-porting to stable kernel series in the coming days is an x86 memory management fix to eliminate a window whereby TLB flushes could be inadvertently skipped.

Intel Linux engineers have fixed a kernel bug introduced last December where some Translation Lookaside Buffer (TLB) flushes could be accidentally skipped.

Intel engineer Dave Hansen explained with the now-merged patch fixing the issue:
"tl;dr: There is a window in the mm switching code where the new CR3 is set and the CPU should be getting TLB flushes for the new mm. But should_flush_tlb() has a bug and suppresses the flush. Fix it by widening the window where should_flush_tlb() sends an IPI."

This fix will be in tomorrow's Linux 6.15-rc6 release and also back-ported to fix the stable Linux kernel versions over the past six months since the bug was introduced.

👁 CPU + flush


This will cause more TLB flushes now, but at least this fix isn't expected to measurably hurt performance:
"This will cause more TLB flush IPIs. But the window is relatively small and I do not expect this to cause any kind of measurable performance impact."

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.