Don't shoot down TLB shootdowns!
Nadav Amit, Amy Tai, Michael Wei
Abstract
Translation Lookaside Buffers (TLBs) are critical for building performant virtual memory systems. Because most processors do not provide coherence for TLB mappings, TLB shootdowns provide a software mechanism that invokes inter-processor interrupts (IPLs) to synchronize TLBs. TLB shootdowns are expensive, so recent work has aimed to avoid the frequency of shootdowns through techniques such as batching. We show that aggressive batching can cause correctness issues and addressing them can obviate the benefits of batching. Instead, our work takes a different approach which focuses on both improving the performance of TLB shootdowns and carefully selecting where to avoid shootdowns. We introduce four general techniques to improve shootdown performance: (1) concurrently flush initiator and remote TLBs, (2) early acknowledgement from remote cores, (3) cacheline consolidation of kernel data structures to reduce cacheline contention, and (4) in-context flushing of userspace entries to address the overheads introduced by Spectre and Meltdown mitigations. We also identify that TLB flushing can be avoiding when handling copy-on-write (CoW) faults and some TLB shootdowns can be batched in certain system calls. Overall, we show that our approach results in significant speedups without sacrificing safety and correctness in both microbenchmarks and real-world applications.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 140709a2-a910-48bd-8537-941942c5ca52Cited by top-tier papers20
- Optimizing Memory-mapped I/O for Fast Storage DevicesAnastasios Papagiannis, Giorgos Xanthakis, Giorgos Saloustros, Manolis Marazakis et al.USENIX ATC 2020 · 68 citations
- Enhancing and Exploiting Contiguity for Fast Memory VirtualizationChloe Alverti, Stratos Psomadakis, Vasileios Karakostas, Jayneel Gandhi et al.ISCA 2020 · 41 citations
- Virtual-Memory Assisted Buffer ManagementViktor Leis, Adnan Alhomssi, Tobias Ziegler, Yannick Loeck et al.SIGMOD 2023 · 37 citations
- WineFS: a hugepage-aware file system for persistent memory that ages gracefullyRohan Kadekodi, Saurabh Kadekodi, Soujanya Ponnapalli, Harshad Shirwadkar et al.SOSP 2021 · 35 citations
- MadFS: Per-File Virtualization for Userspace Persistent Memory FilesystemsShawn Zhong, Chenhao Ye, Guanzhou Hu, Suyan Qu et al.FAST 2023 · 27 citations
Builds on1
Related papers
- Fallout: Leaking Data on Meltdown-resistant CPUsClaudio Canella, Daniel Genkin, Lukas Giner, Daniel Gruss et al.CCS 2019 · 289 citations
- TLB;DR: Enhancing TLB-based Attacks with TLB Desynchronized Reverse EngineeringAndrei Tatar, Daniël Trujillo, Cristiano Giuffrida, Herbert BosUSENIX Security 2022
- Speculation at Fault: Modeling and Testing Microarchitectural Leakage of CPU ExceptionsJana Hofmann, Emanuele Vannacci, Cédric Fournet, Boris Köpf et al.USENIX Security 2023
- SafeFetch: Practical Double-Fetch Protection with Kernel-Fetch CachingVictor Duta, Mitchel Aloserij, Cristiano GiuffridaUSENIX Security 2024 · 2 citations
- Performance evolution of mitigating transient execution attacksJonathan Behrens, Adam Belay, M. Frans KaashoekEuroSys 2022 · 8 citations
