mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-30 16:35:24 +00:00
virsh: Add support for VIR_MIGRATE_ZEROCOPY flag
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
8744beecb3
commit
efa3baeae7
@ -3285,7 +3285,7 @@ migrate
|
||||
[--persistent] [--undefinesource] [--suspend] [--copy-storage-all]
|
||||
[--copy-storage-inc] [--change-protection] [--unsafe] [--verbose]
|
||||
[--rdma-pin-all] [--abort-on-error] [--postcopy]
|
||||
[--postcopy-after-precopy] [--postcopy-resume]
|
||||
[--postcopy-after-precopy] [--postcopy-resume] [--zerocopy]
|
||||
domain desturi [migrateuri] [graphicsuri] [listen-address] [dname]
|
||||
[--timeout seconds [--timeout-suspend | --timeout-postcopy]]
|
||||
[--xml file] [--migrate-disks disk-list] [--disks-port port]
|
||||
@ -3362,6 +3362,11 @@ high (and thus allowing the domain to lock most of the host's memory). Doing so
|
||||
may be dangerous to both the domain and the host itself since the host's kernel
|
||||
may run out of memory.
|
||||
|
||||
*--zerocopy* requests zero-copy mechanism to be used for migrating memory pages.
|
||||
For QEMU/KVM this means QEMU will be temporarily allowed to lock all guest
|
||||
pages in host's memory, although only those that are queued for transfer will
|
||||
be locked at the same time.
|
||||
|
||||
``Note``: Individual hypervisors usually do not support all possible types of
|
||||
migration. For example, QEMU does not support direct migration.
|
||||
|
||||
|
@ -10890,6 +10890,10 @@ static const vshCmdOptDef opts_migrate[] = {
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("resume failed post-copy migration")
|
||||
},
|
||||
{.name = "zerocopy",
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("use zero-copy mechanism for migrating memory pages")
|
||||
},
|
||||
{.name = "migrateuri",
|
||||
.type = VSH_OT_STRING,
|
||||
.completer = virshCompleteEmpty,
|
||||
@ -11296,6 +11300,9 @@ doMigrate(void *opaque)
|
||||
if (vshCommandOptBool(cmd, "postcopy-resume"))
|
||||
flags |= VIR_MIGRATE_POSTCOPY_RESUME;
|
||||
|
||||
if (vshCommandOptBool(cmd, "zerocopy"))
|
||||
flags |= VIR_MIGRATE_ZEROCOPY;
|
||||
|
||||
if (vshCommandOptBool(cmd, "tls"))
|
||||
flags |= VIR_MIGRATE_TLS;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user