Sliding Window Tracker for Unified Virtual Memory
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing unified virtual memory systems face performance degradation due to random selection of memory pages for migration, which can lead to page faults and reduced PPU memory availability for application data storage.
Innovation Solution
A sliding window tracker is implemented to detect inactive memory pages within a defined window, setting reference bits to indicate access status, and migrates these pages from PPU memory to system memory, thereby selecting unused pages for migration efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If the OS randomly selects memory pages to migrate from PPU memory to system memory, then memory management simplicity is maintained, but system performance degrades due to page faults and reduced PPU memory availability
Solution Approach 1:
The sliding window tracker performs preliminary tracking of memory page access patterns before migration decisions are made. By continuously monitoring which pages have been accessed recently and storing this information in the reference vector, the system proactively identifies candidate pages for migration before they are needed, thereby avoiding page faults and performance degradation while maintaining relatively simple memory management overhead
Solution Approach 2:
The system implements feedback through the reference bit mechanism in the page table entries. When a memory page is accessed, the reference bit is set to indicate recent usage. This feedback information is continuously updated and used by the migration heuristic to make informed decisions about which pages to migrate, creating a closed-loop system that adapts to actual memory access patterns while maintaining manageable complexity
2Measurement precision
If the OS uses PTE-based access tracking by setting bits in page table entries, then memory page access tracking is achieved, but performance degrades due to read-modify-write operations overhead
Solution Approach 1:
The reference bit is set preliminarily and passively during normal memory access operations without requiring explicit read-modify-write sequences. The bit is automatically updated as part of the memory access path, and migration decisions are made based on the accumulated state of these bits, eliminating the performance overhead of active bit manipulation while maintaining tracking accuracy
Solution Approach 2:
The access tracking functionality is extracted from the critical performance path of memory operations. Instead of requiring read-modify-write operations on PTEs during every access, the system separates the tracking function (passive bit setting) from the migration decision function, allowing the performance-critical memory access path to remain simple while still gathering necessary information for migration decisions
3Adaptability or versatility
If PTE entries allocate memory for storing access tracking bits for each memory page, then access tracking capability is provided, but available PPU memory for application data storage is reduced
Solution Approach 1:
The reference bit in the page table entry serves multiple functions: it tracks memory access patterns for migration decisions, provides information for virtual memory management, and enables the sliding window tracking mechanism. By making this single bit multi-functional, the system achieves comprehensive access tracking capability without allocating additional memory resources, thereby preserving maximum PPU memory for application data storage
Data Source
AI summary
One embodiment of the present invention is a memory subsystem that includes a sliding window tracker that tracks memory accesses associated with a sliding window of memory page groups. When the sliding window tracker detects an access operation associated with a memory page group within the sliding window, the sliding window tracker sets a reference bit that is associated with the memory page group and is included in a reference vector that represents accesses to the memory page groups within the sliding window. Based on the values of the reference bits, the sliding window tracker causes the selection a memory page in a memory page group that has fallen into disuse from a first memory to a second memory. Because the sliding window tracker tunes the memory pages that are resident in the first memory to reflect memory access patterns, the overall performance of the memory subsystem is improved.


