Windows memory reduction at boot time by memory page reset to zero for virtual machine
AssigneeVirtuozzo International GmbH
InventorsDenis Lunev, Alexey Kobets
Life of this patent
Estimating the term…
Abstract
A method for zeroing guest memory of a VM during boot up, includes the guest OS attempts to set a page to zero. A page fault is generated and is handled by the hypervisor. The page is mapped by the hypervisor to a page in host memory, and is given to the guest. The guest OS attempts to set the next page to zero. Another page fault is generated the hypervisor unmaps the host memory page, and the second page is mapped to the same page. The hypervisor then gives the page to the guest, which contains all zeros. The process is repeated for remaining pages of the guest memory.
Claims14
A method for zeroing guest memory of a Virtual Machine (VM) during boot up, the method comprising:
- (a) setting a host memory page to zero;
- (b) issuing a command to set a first guest memory page to zero;
- (c) waiting for a page fault in the Virtual Machine and transferring the page fault to a supervisory component running on a host node;
- (d) mapping the first guest memory page to the host memory page;
- (e) giving the host memory page to the VM to correspond to the first guest memory page;
- (f) in the VM, setting the first guest memory page to zero;
- (g) issuing a command to set a second guest memory page to zero;
- (h) waiting for a second page fault and transferring the second page fault to the supervisory component;
- (i) unmapping the first guest memory page from the host memory page;
- (j) mapping the second guest memory page to the host memory page;
- (k) giving the host memory page to the VM to correspond to the second guest memory page;
- (l) in the VM, setting the second guest memory page to zero;
- and
- (m) repeating steps (g) though (l) for remaining pages of the guest memory,
- wherein the steps (a)-(m) are performed during boot up of the VM.
A system for zeroing guest memory of a Virtual Machine (VM) during boot up, the system comprising:
- (a) a hardware processor running a host operating system (OS);
- (b) a host memory page set to zero;
- (c) a guest OS of a Virtual Machine (VM) that issues a command to set a first guest memory page to zero;
- (d) a supervisory component running on the processor, and to which a first page fault in the Virtual Machine that is triggered by the command is transferred;
- (e) wherein the first guest memory page is mapped to the host memory page;
- (f) the supervisory component is configured to give the host memory page to the VM to correspond to the first guest memory page;
- (g) the VM is configured to set the first guest memory page to zero;
- (h) the guest OS is configured to issue a second command to set a second guest memory page to zero;
- (i) the supervisory component is configured to process the second page fault triggered by the second command;
- (j) the supervisory component is configured to unmap the first guest memory page from the host memory page, and to map the second guest memory page to the host memory page;
- (k) the supervisory component is configured to give the host memory page to the VM to correspond to the second guest memory page;
- (l) the VM is configured to set the second guest memory page to zero;
- and
- (m) wherein the supervisory component is configured to repeat (i)-(l) for remaining pages of the guest memory, and,
- (n) wherein (c)-(m) are performed during boot up of the VM.
Dependencies are inferred from the claim text.