VM Memory Reclaim Management via Page Type Identification
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional virtualization systems lack efficient methods to inform a host about the actual memory needs of Virtual Machines (VMs), leading to inefficient memory reclaim operations that can slow down the system by reclaiming pages that are actively used by VMs, as the host kernel scans in LRU order without considering VM-specific page usage.
Innovation Solution
Implementing a method that includes a hypervisor to process VM memory requests, a host CPU to control physical memory reclaim, and Guest tools to determine page types based on memory maps, using techniques such as hard lock protection for VM kernel pages, direct access (DAX) for VM DAX pages, and access/dirty (A/D) bit marking for regular VM pages to manage host reclaimable memory effectively.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If the host kernel scans the host RAM in LRU order to reclaim memory, then memory reclaim operations can be performed, but VM-critical pages may be reclaimed causing system slowdown
Solution Approach 1:
The patent segments the memory management system into host-level LRU scanning and VM-level page type identification. The host kernel performs coarse-grained memory reclamation by scanning LRU lists, while Guest tools perform fine-grained identification of page types (kernel, DAX, regular) to prevent reclamation of critical VM pages. This segmentation allows both host memory pressure relief and VM page protection to coexist.
Solution Approach 2:
The patent introduces Guest tools as an intermediary component between the host kernel and VM memory pages. The Guest tools intercept and analyze host reclaim operations, identifying page types based on memory maps, and providing feedback to prevent reclamation of VM-critical pages. This intermediary layer enables informed decision-making about which pages can be safely reclaimed.
2Productivity
If the host scans through host LRU lists to reclaim memory, then memory can be reclaimed for host use, but the pages may be in active use by VMs requiring reallocation from disk
Solution Approach 1:
The patent applies preliminary action by having Guest tools proactively identify and mark VM page types before the host kernel attempts reclamation. By pre-classifying pages as kernel, DAX, or regular pages and providing this information to the host, the system prevents reclamation of critical pages in advance, avoiding the need for time-consuming reallocation and disk I/O operations that would occur if critical pages were reclaimed.
3Ease of operation
If conventional virtualization systems do not provide VM LRU data sharing with the host, then the host can independently manage its memory, but it cannot distinguish between VM pages that are critical and those that are not
Solution Approach 1:
The patent implements a feedback mechanism where Guest tools continuously monitor VM memory usage, identify page types based on memory maps, and provide this information back to the host kernel. This feedback loop enables the host to make informed reclamation decisions with high precision, distinguishing between critical VM pages (kernel, DAX) and non-critical pages (regular), while maintaining host memory management independence.
Data Source
AI summary
System for for managing host reclaimable memory based on VM needs includes a plurality of VMs; a hypervisor configured to process VM memory requests; a host CPU configured to control host physical memory reclaim process; at least one VM being allocated physical memory; Guest tool configured to determine page types based on a memory map; and a host module configured to scan an LRU list for pages that it can reacquire, and to force a slowdown in VM operations when reclaim operations use up more than a predefined share of CPU time. The host CPU performs the following based on the page type: (i) hard lock protection, when the page is a VM kernel page, for host-based reclaim of the page when no other VM pages are left to reacquire; and (ii) access/dirty (A/D) bit marking, when the page is a regular VM page.


