summaryrefslogtreecommitdiff
path: root/Documentation/topics
diff options
context:
space:
mode:
authorLiliia Butorina <l.butorina@partner.samsung.com>2019-05-14 16:08:43 +0300
committerIlya Maximets <i.maximets@samsung.com>2019-05-24 15:31:28 +0300
commit30e834dcb5164dbfe91c017852629c76dd1711d2 (patch)
tree8f0dad8a68f9bd63d4a9a99decb2c5101babd970 /Documentation/topics
parentda05d1c82d6cfdf6877f5edf9d43907edbc34401 (diff)
downloadopenvswitch-30e834dcb5164dbfe91c017852629c76dd1711d2.tar.gz
netdev-dpdk: Post-copy Live Migration support for vhost-user-client.
Post-copy Live Migration for vHost supported since DPDK 18.11 and QEMU 2.12. New global config option 'vhost-postcopy-support' added to control this feature. Ex.: ovs-vsctl set Open_vSwitch . other_config:vhost-postcopy-support=true Changing this value requires restarting the daemon. It's safe to enable this knob even if QEMU doesn't support post-copy LM. Feature marked as experimental and disabled by default because it may cause PMD thread hang on destination host on page fault for the time of page downloading from the source. Feature is not compatible with 'mlockall' and 'dequeue zero-copy'. Support added only for vhost-user-client. Signed-off-by: Liliia Butorina <l.butorina@partner.samsung.com> Co-authored-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Diffstat (limited to 'Documentation/topics')
-rw-r--r--Documentation/topics/dpdk/vhost-user.rst53
1 files changed, 52 insertions, 1 deletions
diff --git a/Documentation/topics/dpdk/vhost-user.rst b/Documentation/topics/dpdk/vhost-user.rst
index 0982e0393..f7b4b338e 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -111,7 +111,8 @@ the guest. There are two ways to do this: using QEMU directly, or using
libvirt.
.. note::
- IOMMU is not supported with vhost-user ports.
+
+ IOMMU and Post-copy Live Migration are not supported with vhost-user ports.
Adding vhost-user ports to the guest (QEMU)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -301,6 +302,52 @@ The default value is false.
QEMU). Starting with QEMU v2.9.1, vhost-iommu-support can safely be
enabled, even without having an IOMMU device, with no performance penalty.
+vhost-user-client Post-copy Live Migration Support (experimental)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``Post-copy`` migration is the migration mode where the destination CPUs are
+started before all the memory has been transferred. The main advantage is the
+predictable migration time. Mostly used as a second phase after the normal
+'pre-copy' migration in case it takes too long to converge.
+
+More information can be found in QEMU `docs`_.
+
+.. _`docs`: https://git.qemu.org/?p=qemu.git;a=blob;f=docs/devel/migration.rst
+
+Post-copy support may be enabled via a global config value
+``vhost-postcopy-support``. Setting this to ``true`` enables Post-copy support
+for all vhost-user-client ports::
+
+ $ ovs-vsctl set Open_vSwitch . other_config:vhost-postcopy-support=true
+
+The default value is ``false``.
+
+.. important::
+
+ Changing this value requires restarting the daemon.
+
+.. important::
+
+ DPDK Post-copy migration mode uses userfaultfd syscall to communicate with
+ the kernel about page fault handling and uses shared memory based on huge
+ pages. So destination host linux kernel should support userfaultfd over
+ shared hugetlbfs. This feature only introduced in kernel upstream version
+ 4.11.
+
+ Post-copy feature supported in DPDK since 18.11.0 version and in QEMU
+ since 2.12.0 version. But it's suggested to use QEMU >= 3.0.1 because
+ migration recovery was fixed for post-copy in 3.0 and few additional bug
+ fixes (like userfaulfd leak) was released in 3.0.1.
+
+ DPDK Post-copy feature requires avoiding to populate the guest memory
+ (application must not call mlock* syscall). So enabling mlockall and
+ dequeue zero-copy features is mis-compatible with post-copy feature.
+
+ Note that during migration of vhost-user device, PMD threads hang for the
+ time of faulted pages download from source host. Transferring 1GB hugepage
+ across a 10Gbps link possibly unacceptably slow. So recommended hugepage
+ size is 2MB.
+
.. _dpdk-testpmd:
DPDK in the Guest
@@ -500,6 +547,10 @@ QEMU versions v2.10 and greater). This value can be set like so::
Because of this limitation, this feature is considered 'experimental'.
+.. note::
+
+ Post-copy Live Migration is not compatible with dequeue zero copy.
+
Further information can be found in the
`DPDK documentation
<https://doc.dpdk.org/guides-18.11/prog_guide/vhost_lib.html>`__