IP Library › Granted Patent US 11,436,141
Granted Patent B2
US 11,436,141 · App. 16/713,934 · Granted Sep 6, 2022

Free memory page hinting by virtual machines

Inventors: David Hildenbrand (Grasbrunn, DE); Michael Tsirkin (Lexington, MA)
Assignee: Red Hat, Inc.
G06F12/0646G06F9/45558G06F2009/45583G06F2212/1044G06F2212/152
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 11,436,141
App. No.
16/713,934
Granted
Sep 6, 2022
Kind
B2
Abstract

Systems and methods for free memory hinting by virtual machines. An example method comprises: identifying, by a virtual machine running on a host computer system, a first memory page referenced by a free memory list maintained by the virtual machine; identifying a second memory page residing in a hinting buffer associated with the virtual machine; moving the second memory page to the free memory list; disassociating the first memory page from the free memory list; and notifying the host computer system of an identifier of the first memory page.

Claims (41)

1. A method comprising:

identifying, by a virtual machine running on a host computer system, a first memory page referenced by a free memory list maintained by the virtual machine;

identifying a second memory page residing in a hinting buffer associated with the virtual machine;

performing an atomic operation to move the second memory page to the free memory list and disassociate the first memory page from the free memory list; and

notifying the host computer system of an identifier of the first memory page.

2. The method of claim 1 , wherein notifying the host computer system of the identifier of the first memory page causes the host computer system to reuse, without copying the first memory page to a persistent storage, a physical memory page that is allocated to the first memory page.

3. The method of claim 1 , further comprising:

responsive to receiving a completion notification from the host computer system, moving the first memory page to the hinting buffer.

4. The method of claim 1 , further comprising:

responsive to receiving a notification from the host computer system, moving the second memory page to the hinting buffer.

5. The method of claim 1 , further comprising:

allocating, by a balloon memory driver of the virtual machine, a plurality of memory pages to the hinting buffer.

6. The method of claim 1 , wherein moving the second memory page to the free memory list is performed responsive to evaluating a memory pressure metric.

7. A system comprising:

a memory; and

a processing device operatively coupled to the memory, the processing device to:

identify a first memory page referenced by a free memory list maintained by a virtual machine;

identify a second memory page residing in a hinting buffer associated with the virtual machine;

perform an atomic operation to move the second memory page to the free memory list and disassociate the first memory page from the free memory list; and

notify a hypervisor of an identifier of the first memory page.

8. The system of claim 7 , wherein notifying the hypervisor of the identifier of the first memory page causes the hypervisor to reuse, without copying the first memory page to a persistent storage, a physical memory page that is allocated to the first memory page.

9. The system of claim 7 , wherein the processing device is further to:

responsive to receiving a completion notification from the hypervisor, move the first memory page to the hinting buffer.

10. The system of claim 7 , wherein the processing device is further to:

responsive to receiving a notification from the hypervisor, move the second memory page to the hinting buffer.

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

allocate, by a balloon memory driver of the virtual machine, a plurality of memory pages to the hinting buffer.

12. The system of claim 7 , wherein moving the second memory page to the free memory list is performed responsive to evaluating a memory pressure metric.

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

identify, by a virtual machine, a first memory page referenced by a free memory list maintained by the virtual machine;

identifying a second memory page residing in a hinting buffer associated with the virtual machine;

perform an atomic operation to move the second memory page to the free memory list and disassociate the first memory page from the free memory list; and

notifying a hypervisor of an identifier of the first memory page.

14. The non-transitory machine-readable storage medium of claim 13 , wherein notifying the hypervisor of the identifier of the first memory page causes the hypervisor to reuse, without copying the first memory page to a persistent storage, a physical memory page that is allocated to the first memory page.

15. The non-transitory machine-readable storage medium of claim 13 , further comprising executable instructions that, when executed by the processing device, cause the processing device to:

responsive to receiving a completion notification from the hypervisor, move the first memory page to the hinting buffer.

16. The non-transitory machine-readable storage medium of claim 13 , further comprising executable instructions that, when executed by the processing device, cause the processing device to:

responsive to receiving a notification from the hypervisor, move the second memory page to the hinting buffer.

17. The non-transitory machine-readable storage medium of claim 13 , further comprising executable instructions that, when executed by the processing device, cause the processing device to:

allocate, by a balloon memory driver of the virtual machine, a plurality of memory pages to the hinting buffer.

18. The non-transitory machine-readable storage medium of claim 13 , wherein moving the second memory page to the free memory list is performed responsive to evaluating a memory pressure metric.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 13, 2019
From: HILDENBRAND, DAVID; TSIRKIN, MICHAEL
To: RED HAT, INC.
Reel/Frame 051279/0513 →
Continuity (1)
Related Publication 20210182191A1 · Jun 17, 2021