IP Library Granted Patent US 12,498,953
Granted Patent B2
US 12,498,953 · App. 17/851,593 · Granted Dec 16, 2025

Memory management for busy virtual machine guests

Inventors: Michael Tsirkin (Yokneam Illit, IL); Andrea Arcangeli (Mineola, NY)
Assignee: Red Hat, Inc.
G06F9/45558G06F2009/4557G06F2009/45583
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,498,953
App. No.
17/851,593
Granted
Dec 16, 2025
Kind
B2
Abstract

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.

Claims (45)

1 . A method, comprising:

accessing, by a processing device executing a hypervisor running on a host computer system, a data structure generated by and exposed by a virtual machine managed by the hypervisor, wherein the data structure includes an estimated next access time for memory pages of a plurality of memory pages associated with the virtual machine, and wherein the estimated next access time for the memory pages of the plurality of memory pages associated with the virtual machine is sorted based on a likelihood of access of the memory pages;

estimating, by the hypervisor, a read latency time associated with the virtual machine, wherein the read latency time includes an expected read time and a virtual machine exit time;

identifying, by the processing device executing the hypervisor and using the data structure, a memory page associated with the estimated next access time that satisfies a predefined condition with respect to the read latency time; and

swapping, by the hypervisor, out the memory page.

2 . The method of claim 1 , further comprising:

making the memory page inaccessible by the virtual machine.

3 . The method of claim 1 , further comprising:

assigning the memory page to a second virtual machine managed by the hypervisor.

4 . The method of claim 1 , wherein estimating the read latency time further comprises analyzing a lapsed time from a last access to the memory page.

5 . The method of claim 1 , wherein estimating the read latency time further comprises analyzing a frequency of access to the memory page.

6 . The method of claim 1 , wherein the predefined condition is satisfied when the estimated next access time is larger than or equal to the read latency time adjusted by a factor value.

7 . The method of claim 6 , wherein the factor value is set to be dependent on a memory stress metric.

8 . The method of claim 1 , further comprising:

identifying the plurality of memory pages each associated with the estimated next access time that satisfies the predefined condition with respect to the read latency time; and

determining one of the plurality of memory pages as the memory page.

9 . The method of claim 8 , further comprising:

comparing the estimated next access time of the plurality of memory pages.

10 . The method of claim 1 , further comprising:

accessing, by the hypervisor, a second data structure in a guest memory space of a second virtual machine managed by the hypervisor; and

identifying the memory page using the second data structure.

11 . A system comprising:

a memory; and

a processing device operatively coupled to the memory to:

access, by a hypervisor running on a host computer system, a data structure generated by and exposed by a virtual machine managed by the hypervisor, wherein the data structure includes an estimated next access time for memory pages of a plurality of memory pages associated with the virtual machine, and wherein the estimated next access time for the memory pages of the plurality of memory pages associated with the virtual machine is sorted based on a likelihood of access of the memory pages;

estimate, by the hypervisor, a read latency time associated with the virtual machine, wherein the read latency time includes an expected read time and a virtual machine exit time;

identify, by the hypervisor and using the data structure, a memory page associated with the estimated next access time that satisfies a predefined condition with respect to the read latency time; and

swap, by the hypervisor, out the memory page.

12 . The system of claim 11 , wherein the processing device is further to:

make the memory page inaccessible by the virtual machine.

13 . The system of claim 11 , wherein the processing device is further to:

assign the memory page to a second virtual machine managed by the hypervisor.

14 . The system of claim 11 , wherein the predefined condition is satisfied when the estimated next access time is larger than or equal to the read latency time adjusted by a factor value.

15 . The system of claim 14 , wherein the factor value is set to be dependent on a memory stress metric.

16 . The system of claim 11 , wherein to estimate the read latency time associated with the virtual machine, the processing device is to analyze a lapsed time from a last access to the memory page.

17 . The system of claim 11 , wherein to estimate the read latency time associated with the virtual machine, the processing device is to analyze a frequency of access to the memory page.

18 . A non-transitory machine-readable storage medium storing instructions which, when executed by a processing device, cause the processing device to:

accessing, by the processing device executing a hypervisor running on a host computer system, a data structure generated by and exposed by a virtual machine managed by the hypervisor, wherein the data structure includes an estimated next access time for memory pages of a plurality of memory pages associated with the virtual machine, and wherein the estimated next access time for the memory pages of the plurality of memory pages associated with the virtual machine is sorted based on a likelihood of access of the memory pages;

estimating, by the hypervisor, a read latency time associated with the virtual machine, wherein the read latency time includes an expected read time and a virtual machine exit time;

identifying, by the processing device executing the hypervisor and using the data structure, a memory page associated with the estimated next access time that satisfies a predefined condition with respect to the read latency time; and

swap, by the hypervisor, out the memory page.

19 . The non-transitory machine-readable storage medium of claim 18 , wherein the instructions, when executed by the processing device, cause the processing device further to:

make the memory page inaccessible by the virtual machine.

20 . The non-transitory machine-readable storage medium of claim 18 , wherein the instructions, when executed by the processing device, cause the processing device further to:

assign the memory page to a second virtual machine managed by the hypervisor.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 14, 2022
From: TSIRKIN, MICHAEL; ARCANGELI, ANDREA
To: RED HAT, INC.
Reel/Frame 061088/0682 →
Continuity (1)
Related Publication 20230418643A1 · Dec 28, 2023
References Cited (30)
US 8607013B2 · Chen et al. · 2013 [cited by applicant]
US 9201612B1 · Vincent · 2015 [cited by examiner]
US 9286101B2 · Riel · 2016 [cited by applicant]
US 9552233B1 · Tsirkin et al. · 2017 [cited by applicant]
US 10073711B2 · Zheng · 2018 [cited by examiner]
US 10768959B2 · Tsirkin et al. · 2020 [cited by applicant]
US 20020002650A1 · Christenson · 2002 [cited by examiner]
US 20060222019A1 · Hedin · 2006 [cited by examiner]
US 20080155167A1 · Mansell · 2008 [cited by examiner]
US 20080235793A1 · Schunter · 2008 [cited by examiner]
US 20120011508A1 · Ahmad · 2012 [cited by examiner]
US 20120030406A1 · Chang · 2012 [cited by examiner]
US 20130185474A1 · Ge · 2013 [cited by examiner]
US 20130275973A1 · Greenfield · 2013 [cited by examiner]
US 20140143507A1 · Maria Joseph · 2014 [cited by examiner]
US 20140244938A1 · Cota-Robles · 2014 [cited by examiner]
US 20150039838A1 · Tarasuk-Levin · 2015 [cited by examiner]
US 20150095919A1 · Vincent · 2015 [cited by examiner]
US 20160048401A1 · Bhat · 2016 [cited by examiner]
US 20170034297A1 · Waheed · 2017 [cited by examiner]
US 20170315931A1 · Liu · 2017 [cited by examiner]
US 20180341555A1 · Tsao · 2018 [cited by examiner]
US 20200125443A1 · Hung · 2020 [cited by examiner]
US 20200341797A1 · Tsirkin · 2020 [cited by examiner]
US 20210182191A1 · Hildenbrand et al. · 2021 [cited by applicant]
US 20210342260A1 · Tsirkin · 2021 [cited by applicant]
US 20220050722A1 · Dugast · 2022 [cited by examiner]
US 20220066678A1 · Singidi · 2022 [cited by examiner]
Miller, Konard et al., “XLH: More Effective Memory Deduplication Scanners through Cross-Layer Hints”, Karlsruhe Institute of Technology (KIT), 2013, https://www.usenix.org/system/files/conference/atc13/atc13-miller.pdf,… [cited by applicant]
Whitaker, Andrew et al., “Denali: Lightweight Virtual Machines for Distributed and Networked Applications”, The University of Washington, http://web.cs.ucla.edu/˜miodrag/cs259-security/whitaker02denali.pdf, 14 pages. [cited by applicant]