VMware Is Exploring Reducing Meltdown/PTI Overhead With Deferred Flushes

Written by Michael Larabel in Linux Kernel on 25 August 2019 at 02:13 AM EDT. 10 Comments
LINUX KERNEL
VMware engineer Nadav Amit who previously pursued "Optpolines" and other possible performance optimizations in light of Spectre / Meltdown vulnerabilities is now proposing patches for deferring PTI flushes to help with addressing the performance overhead caused by Meltdown.

Kernel page table isolation (PTI) for mitigating Meltdown caused a sizable hit in affected workloads while now Nadav is hoping that improving the behavior around flushes could help in offsetting some of that slowdown. He explained in a new kernel patch series:
INVPCID is considerably slower than INVLPG of a single PTE, but it is currently used to flush PTEs in the user page-table when PTI is used.

Instead, it is possible to defer TLB flushes until after the user page-tables are loaded. Preventing speculation over the TLB flushes should keep the whole thing safe. In some cases, deferring TLB flushes in such a way can result in more full TLB flushes, but arguably this behavior is oftentimes beneficial.

These patches are based and evaluated on top of the concurrent TLB-flushes v4 patch-set.

His patches did help with the flush performance, but he doesn't appear confident yet over any possible affects on security or performance. No other kernel developers have commented on this ~200 line change, so we'll need to wait and see where this possible PTI/Meltdown optimization leads.
Related News
About The Author
Michael Larabel

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.

Popular News This Week