US 12,169,730 B2
Handling memory accounting when suspending and resuming virtual machines to/from volatile memory
Rajesh Venkatasubramanian, San Jose, CA (US); Ishan Banerjee, Santa Clara, CA (US); Preeti Agarwal, San Jose, CA (US); Ashish Kaila, San Jose, CA (US); and Halesh Sadashiv, Bangalore (IN)
Assigned to VMware LLC, Palo Alto, CA (US)
Filed by VMware LLC, Palo Alto, CA (US)
Filed on Nov. 19, 2021, as Appl. No. 17/530,522.
Claims priority of application No. 202141033344 (IN), filed on Jul. 24, 2021.
Prior Publication US 2023/0027937 A1, Jan. 26, 2023
Int. Cl. G06F 9/455 (2018.01)
CPC G06F 9/45558 (2013.01) [G06F 2009/45575 (2013.01)] 21 Claims
OG exemplary drawing
 
1. A method comprising, at a time of suspending a virtual machine (VM) to a volatile memory of a host system:
creating, by a hypervisor of the host system, a resource group node in a memory resource tree of the hypervisor, the memory resource tree being usable by the hypervisor for tracking volatile memory usage of processes running on the host system;
creating, by the hypervisor, a memory client node under an existing node for the VM in the memory resource tree;
for each guest physical memory page of the VM:
transferring, by the hypervisor, ownership of the guest physical memory page to a component of the hypervisor; and
incrementing, by the hypervisor, a consumption parameter of the memory client node indicating an amount of the volatile memory consumed by the memory client node; and
upon completing the suspending of the VM, moving, by the hypervisor, the memory client node to reside under the resource group node in the memory resource tree.