US 12,367,059 B2
Efficient memory swap for virtual machines
Michael Tsirkin, Yokneam Illit (IL); and Andrea Arcangeli, Mineola, NY (US)
Assigned to Red Hat, Inc., Raleigh, NC (US)
Filed by Red Hat, Inc., Raleigh, NC (US)
Filed on Jun. 28, 2022, as Appl. No. 17/851,669.
Prior Publication US 2023/0418644 A1, Dec. 28, 2023
Int. Cl. G06F 9/455 (2018.01); G06F 12/02 (2006.01)
CPC G06F 9/45558 (2013.01) [G06F 12/0223 (2013.01); G06F 2009/45583 (2013.01); G06F 2212/152 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
receiving, by a hypervisor running on a host computer system, a request, from a virtual machine managed by the hypervisor, to write to a virtual disk a content of a memory page identified by a guest physical address (GPA);
detecting, by the hypervisor, that the content of the memory page is stored on a storage device;
storing, on the virtual disk, an identifier of a location of the content of the memory page on the storage device; and
un-mapping the GPA from the storage device responsive to receiving a notification that the memory page will not be used by the virtual machine.