Hypervisor Memory Swapping Using Guest Page Access Hints

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing virtualization technologies face inefficiencies in managing memory for busy virtual machines, particularly when there are few free pages, leading to performance delays due to the lack of visibility into which memory pages can be swapped out without affecting system performance.

Innovation Solution

A guest data structure is exposed to the hypervisor, providing visibility into memory pages that are not currently free but may become available, allowing the hypervisor to swap them out based on predicted access times, thus enhancing memory management efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If the hypervisor pages out memory pages to disk storage to free up memory, then memory availability is improved, but I/O operations and system performance deteriorate

Engineering Contradiction:
Improvememory availabilityVSAvoidI/O operation delay
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The guest operating system performs preliminary actions by identifying and signaling free memory pages to the hypervisor before the hypervisor needs to page out memory. This advance notification allows the hypervisor to have ready-to-use free pages without performing costly I/O operations to read pages from disk storage at the moment of need.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The guest operating system serves itself by proactively identifying its own free memory pages and communicating this information to the hypervisor. This self-service approach eliminates the need for the hypervisor to perform blind paging operations, reducing unnecessary I/O operations and improving overall system efficiency.

Inventive Principle:
Principle #25Self-service

2Quantity of substance

If the hypervisor blindly pages out memory pages without knowing guest OS usage, then memory reclamation is achieved, but system performance deteriorates due to swapping in-use pages

Engineering Contradiction:
Improvememory reclamationVSAvoidsystem performance
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The guest operating system provides feedback to the hypervisor by signaling which memory pages are free and which are in use. This feedback mechanism allows the hypervisor to make informed decisions about memory page selection, ensuring that only truly free pages are paged out rather than blindly swapping pages that may still be in use by the guest OS.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The guest operating system performs preliminary identification of free memory pages before the hypervisor needs to reclaim memory. This advance knowledge allows the hypervisor to selectively page out only the appropriate free pages, avoiding the performance degradation caused by swapping in-use pages.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If free page hinting is used when the guest OS has many free pages, then memory management efficiency is improved, but the approach becomes ineffective when the guest OS has few free pages

Engineering Contradiction:
Improvememory management efficiencyVSAvoideffectiveness under different memory conditions
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The system dynamically adapts its memory management approach based on the guest operating system's memory conditions. When the guest OS has many free pages, the traditional free page hinting mechanism operates effectively. When the guest OS has few free pages, the system transitions to using the data structure exposure mechanism, allowing the hypervisor to efficiently identify candidate pages for swapping based on the exposed memory usage information.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS12498953B2Memory management for busy virtual machine guests
Publication Date: 2025.12.16 RED HAT LLC
  • US12498953B2 patent drawing
  • US12498953B2 patent drawing
  • US12498953B2 patent drawing

AI summary

Systems and methods for enhancing memory management for virtual machines. An example method may comprise: accessing, by a hypervisor running on a host computer system, a data structure exposed by a virtual machine managed by the hypervisor, wherein the data structure includes an estimated next access time for one or more memory pages of a plurality of memory pages associated with the virtual machine; estimating a read latency time associated with the virtual machine; identifying, using the data structure, a memory page associated with an estimated next access time that satisfies a predefined condition with respect to the read latency time; and swapping out the memory page.