Reducing copy operations for a virtual machine migration
AssigneeAmazon Technologies, Inc.
InventorsAdi Habusha, Ali Ghassan Saidi
Life of this patent
Estimating the term…
Abstract
Systems and methods are provided to reduce the number of redundant copy operations performed as part of a live migration of a virtual machine executing a guest. A hypervisor can queue the copy operations in a processing engine. While pre-copying for the live migration of the VM, the guest may continue to write to the pages. In one embodiment, the processing engine may clear a dirty page just before performing the copy operation of the modified page to a target device, thus extending the window of time to capture any future writes to that page.
Claims20
A system comprising:
- a host processor configured to execute a hypervisor, wherein the hypervisor is configured to:
- provide information, associated with a page table entry (PTE) corresponding to a page of memory, to schedule a copy operation of the page for a live migration of a virtual machine (VM) running on the host processor, wherein the page is associated with a guest operating system (OS) executing within the VM, and wherein the PTE comprises a dirty page indicator to indicate that the page has been modified;
- and
- a processing engine separate from the hypervisor executing on the host processor, the processing engine configured to:
- receive the information associated with the PTE corresponding to the page, the information including an address of the PTE associated with the guest OS;
- read the dirty page indicator in the PTE using the address to determine that the page has been modified;
- schedule the page for the copy operation;
- determine that the page has later been modified again;
- execute an atomic operation to clear the dirty page indicator in the PTE after the later modification and before performing the copy operation;
- and
- perform the copy operation.
A method, comprising:
- receiving, by a processing engine separate from a hypervisor executing on a host processor, an address of a page table entry (PTE) in memory corresponding to a page associated with a guest, the address being received from the hypervisor to perform a copy operation subsequent to modification of the page by the guest, the hypervisor executing on the host processor in a host device, wherein the guest is executing within a virtual machine (VM) running on the host processor, the PTE comprising a dirty page indicator to indicate that the page has been modified;
- determining that the page has been modified;
- scheduling the page for the copy operation;
- determining that the page has later been modified again;
- executing, by the processing engine, an atomic operation to clear the dirty page indicator in the PTE after the later modification and before performing the copy operation;
- and
- performing, by the processing engine, the copy operation.
An apparatus comprising:
- a memory configured to store information associated with a copy operation to be performed for a page, wherein the information is received from a hypervisor executing on a host processor, and wherein the page is associated with a guest executing within a virtual machine (VM) executing on the host processor;
- a processor separate from the hypervisor executing on the host processor, the processor configured to:
- determine that the page has been modified;
- schedule the page for the copy operation;
- determine that the page has later been modified again;
- and
- clear a dirty page indicator in a page table entry (PTE) corresponding to the page using the information after the later modification and prior to performing the copy operation;
- and
- a direct memory access (DMA) controller configured to perform the copy operation.
Dependencies are inferred from the claim text.