mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-migration: Optimize downtime by moving stop_dirty_log()
The larger the VM memory, the greater the memory pressure, and the greater the stop_dirty_log() overhead. Moving stop_dirty_log() outside the downtime period can reduce downtime. Signed-off-by: Jinrong Liang <cloudliang@tencent.com>
This commit is contained in:
+5
-3
@@ -1209,9 +1209,6 @@ impl Vmm {
|
|||||||
|
|
||||||
// Send last batch of dirty pages
|
// Send last batch of dirty pages
|
||||||
Self::vm_maybe_send_dirty_pages(vm, &mut socket)?;
|
Self::vm_maybe_send_dirty_pages(vm, &mut socket)?;
|
||||||
|
|
||||||
// Stop logging dirty pages
|
|
||||||
vm.stop_dirty_log()?;
|
|
||||||
}
|
}
|
||||||
// Capture snapshot and send it
|
// Capture snapshot and send it
|
||||||
let vm_snapshot = vm.snapshot()?;
|
let vm_snapshot = vm.snapshot()?;
|
||||||
@@ -1231,6 +1228,11 @@ impl Vmm {
|
|||||||
MigratableError::MigrateSend(anyhow!("Error completing migration")),
|
MigratableError::MigrateSend(anyhow!("Error completing migration")),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
// Stop logging dirty pages
|
||||||
|
if !send_data_migration.local {
|
||||||
|
vm.stop_dirty_log()?;
|
||||||
|
}
|
||||||
|
|
||||||
info!("Migration complete");
|
info!("Migration complete");
|
||||||
|
|
||||||
// Let every Migratable object know about the migration being complete
|
// Let every Migratable object know about the migration being complete
|
||||||
|
|||||||
Reference in New Issue
Block a user