[Paper Review] Hardware Translation Coherence for Virtualized Systems
This paper proposes HATRIC, a hardware translation coherence mechanism that leverages existing cache coherence protocols to efficiently invalidate translation structures (TLBs, MMU caches, nTLBs) during page remapping in virtualized systems. By enabling precise, targeted invalidation with minimal hardware overhead, HATRIC achieves up to 30% performance improvement and 10% energy reduction in KVM-based systems, with only 2% area cost per CPU.
To improve system performance, modern operating systems (OSes) often undertake activities that require modification of virtual-to-physical page translation mappings. For example, the OS may migrate data between physical frames to defragment memory and enable superpages. The OS may migrate pages of data between heterogeneous memory devices. We refer to all such activities as page remappings. Unfortunately, page remappings are expensive. We show that translation coherence is a major culprit and that systems employing virtualization are especially badly affected by their overheads. In response, we propose hardware translation invalidation and coherence or HATRIC, a readily implementable hardware mechanism to piggyback translation coherence atop existing cache coherence protocols. We perform detailed studies using KVM-based virtualization, showing that HATRIC achieves up to 30% performance and 10% energy benefits, for per-CPU area overheads of 2%. We also quantify HATRIC's benefits on systems running Xen and find up to 33% performance improvements.
Motivation & Objective
- Address the high performance and energy overhead caused by translation coherence during frequent page remappings in virtualized systems with heterogeneous memory.
- Overcome the limitations of software-based translation coherence, which forces full flushes of translation structures even when only a single page is remapped.
- Design a hardware mechanism that enables precise invalidation of only the affected translation entries across TLBs, MMU caches, and nested TLBs.
- Ensure compatibility with existing virtualization extensions (e.g., Intel VT-x, AMD-V) and support for both guest and nested page table updates.
- Minimize hardware complexity and area cost while maximizing performance and energy efficiency in production workloads.
Proposed method
- Extend existing hardware cache coherence protocols to support translation coherence by piggybacking on coherence message traffic for translation structure invalidation.
- Modify TLBs, MMU caches, and nested TLBs to support targeted invalidation of entries corresponding to remapped pages, rather than full flushes.
- Introduce a dual-grain coherence directory that tracks both cache lines and translation entries, enabling efficient identification of CPUs that cache specific translations.
- Use reverse-lookup content-addressable memory (CAM) to map system physical addresses to CPU identifiers, allowing the initiator to identify only relevant target CPUs for invalidation.
- Design lightweight target-side handling that allows CPUs to quickly invalidate entries and send acknowledgments without disrupting ongoing workloads.
- Integrate HATRIC into KVM and Xen virtualization stacks to evaluate real-world performance and energy impact using representative memory workloads.
Experimental results
Research questions
- RQ1To what extent does translation coherence overhead dominate system performance in virtualized systems with frequent page remappings?
- RQ2Can translation coherence be efficiently co-located with existing cache coherence protocols to reduce the need for full translation structure flushes?
- RQ3How does HATRIC’s precision in invalidation compare to software-based or coarse-grained hardware approaches in terms of performance and energy efficiency?
- RQ4What is the impact of HATRIC on systems using heterogeneous memory architectures that rely heavily on page migration?
- RQ5How does HATRIC scale across different hypervisors, such as KVM and Xen, under realistic workloads?
Key findings
- HATRIC reduces system runtime by up to 30% and energy consumption by up to 10% in KVM-based virtualized systems compared to software-based translation coherence.
- The mechanism achieves these gains with only a 2% area overhead per CPU, making it highly practical for deployment in production systems.
- In Xen-based systems, HATRIC delivers up to 33% performance improvement over the best software-based paging policy, demonstrating strong generality across virtualization platforms.
- HATRIC outperforms UNITD++ by 5–10% in performance and is more energy-efficient, primarily due to avoiding the need for reverse-lookup CAMs and reducing translation structure lookup energy.
- The use of a dual-grain coherence directory enables efficient tracking of both cache lines and translation entries, minimizing spurious coherence messages without significant area cost.
- Eager directory updates and fine-grained tracking mechanisms yield negligible performance gains but increase energy consumption, confirming that HATRIC’s simpler design is optimal.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.