DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support
@ 2015-12-02  3:43 Yuanhan Liu
  2015-12-02  3:43 ` [dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request Yuanhan Liu
                   ` (6 more replies)
  0 siblings, 7 replies; 98+ messages in thread
From: Yuanhan Liu @ 2015-12-02  3:43 UTC (permalink / raw)
  To: dev; +Cc: Victor Kaplansky, Michael S. Tsirkin

This patch set adds the initial vhost-user live migration support.

The major task behind that is to log pages we touched during
live migration. So, this patch is basically about adding vhost
log support, and using it.

Patchset
========
- Patch 1 handles VHOST_USER_SET_LOG_BASE, which tells us where
  the dirty memory bitmap is.
    
- Patch 2 introduces a vhost_log_write() helper function to log
  pages we are gonna change.

- Patch 3 logs changes we made to used vring.

- Patch 4 sets log_fhmfd protocol feature bit, which actually
  enables the vhost-user live migration support.

A simple test guide (on same host)
==================================

The following test is based on OVS + DPDK. And here is guide
to setup OVS + DPDK:

    http://wiki.qemu.org/Features/vhost-user-ovs-dpdk

1. start ovs-vswitchd

2. Add two ovs vhost-user port, say vhost0 and vhost1

3. Start a VM1 to connect to vhost0. Here is my example:

   $QEMU -enable-kvm -m 1024 -smp 4 \
       -chardev socket,id=char0,path=/var/run/openvswitch/vhost0  \
       -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
       -device virtio-net-pci,netdev=mynet1,mac=52:54:00:12:34:58 \
       -object memory-backend-file,id=mem,size=1024M,mem-path=$HOME/hugetlbfs,share=on \
       -numa node,memdev=mem -mem-prealloc \
       -kernel $HOME/iso/vmlinuz -append "root=/dev/sda1" \
       -hda fc-19-i386.img \
       -monitor telnet::3333,server,nowait -curses

4. run "ping $host" inside VM1

5. Start VM2 to connect to vhost0, and marking it as the target
   of live migration (by adding -incoming tcp:0:4444 option)

   $QEMU -enable-kvm -m 1024 -smp 4 \
       -chardev socket,id=char0,path=/var/run/openvswitch/vhost1  \
       -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
       -device virtio-net-pci,netdev=mynet1,mac=52:54:00:12:34:58 \
       -object memory-backend-file,id=mem,size=1024M,mem-path=$HOME/hugetlbfs,share=on \
       -numa node,memdev=mem -mem-prealloc \
       -kernel $HOME/iso/vmlinuz -append "root=/dev/sda1" \
       -hda fc-19-i386.img \
       -monitor telnet::3334,server,nowait -curses \
       -incoming tcp:0:4444 

6. connect to VM1 monitor, and start migration:

   > migrate tcp:0:4444

7. After a while, you will find that VM1 has been migrated to VM2,
   and the "ping" command continues running, perfectly.


Note: this patch set has mostly been based on Victor Kaplansk's demo
work (vhost-user-bridge) at QEMU project. I was thinking to add Victor
as the co-author. Victor, what do you think of that? :)

Comments are welcome!

---
Yuanhan Liu (4):
  vhost: handle VHOST_USER_SET_LOG_BASE request
  vhost: introduce vhost_log_write
  vhost: log vring changes
  vhost: enable log_shmfd protocol feature

 lib/librte_vhost/rte_virtio_net.h             | 35 ++++++++++++++
 lib/librte_vhost/vhost_rxtx.c                 | 70 ++++++++++++++++++---------
 lib/librte_vhost/vhost_user/vhost-net-user.c  |  7 ++-
 lib/librte_vhost/vhost_user/vhost-net-user.h  |  6 +++
 lib/librte_vhost/vhost_user/virtio-net-user.c | 44 +++++++++++++++++
 lib/librte_vhost/vhost_user/virtio-net-user.h |  5 +-
 lib/librte_vhost/virtio-net.c                 |  4 ++
 7 files changed, 145 insertions(+), 26 deletions(-)

-- 
1.9.0

^ permalink raw reply	[flat|nested] 98+ messages in thread

end of thread, other threads:[~2016-03-11 13:22 UTC | newest]

Thread overview: 98+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-02  3:43 [dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support Yuanhan Liu
2015-12-02  3:43 ` [dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request Yuanhan Liu
2015-12-02 13:53   ` Panu Matilainen
2015-12-02 14:31     ` Yuanhan Liu
2015-12-02 14:48       ` Panu Matilainen
2015-12-02 15:09         ` Yuanhan Liu
2015-12-02 16:58           ` Panu Matilainen
2015-12-02 17:24             ` Michael S. Tsirkin
2015-12-02 16:38       ` Thomas Monjalon
2015-12-03  1:49         ` Yuanhan Liu
2015-12-06 23:07     ` Thomas Monjalon
2015-12-07  2:00       ` Yuanhan Liu
2015-12-07  2:03         ` Thomas Monjalon
2015-12-07  2:18           ` Yuanhan Liu
2015-12-07  2:49             ` Thomas Monjalon
2015-12-07  6:29       ` Panu Matilainen
2015-12-07 11:28         ` Thomas Monjalon
2015-12-07 11:41           ` Panu Matilainen
2015-12-07 13:55             ` Thomas Monjalon
2015-12-07 16:48               ` Panu Matilainen
2015-12-07 17:47                 ` Thomas Monjalon
2015-12-08  5:57   ` Xie, Huawei
2015-12-08  7:25     ` Yuanhan Liu
2015-12-02  3:43 ` [dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write Yuanhan Liu
2015-12-02 13:53   ` Victor Kaplansky
2015-12-02 14:39     ` Yuanhan Liu
2015-12-09  3:33     ` Xie, Huawei
2015-12-09  3:42       ` Yuanhan Liu
2015-12-09  5:44         ` Xie, Huawei
2015-12-09  8:41           ` Yuanhan Liu
2015-12-02  3:43 ` [dpdk-dev] [PATCH 3/4] vhost: log vring changes Yuanhan Liu
2015-12-02 14:07   ` Victor Kaplansky
2015-12-02 14:38     ` Yuanhan Liu
2015-12-02 15:58       ` Victor Kaplansky
2015-12-02 16:26         ` Michael S. Tsirkin
2015-12-03  2:31           ` Yuanhan Liu
2015-12-09  2:45     ` Xie, Huawei
2015-12-02  3:43 ` [dpdk-dev] [PATCH 4/4] vhost: enable log_shmfd protocol feature Yuanhan Liu
2015-12-02 14:10 ` [dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support Victor Kaplansky
2015-12-02 14:33   ` Yuanhan Liu
2015-12-09  3:41 ` Xie, Huawei
2015-12-17  3:11 ` [dpdk-dev] [PATCH v2 0/6] " Yuanhan Liu
2015-12-17  3:11   ` [dpdk-dev] [PATCH v2 1/6] vhost: handle VHOST_USER_SET_LOG_BASE request Yuanhan Liu
2015-12-21 15:32     ` Xie, Huawei
2015-12-22  2:25       ` Yuanhan Liu
2015-12-22  2:41         ` Xie, Huawei
2015-12-22  2:55           ` Yuanhan Liu
2015-12-17  3:11   ` [dpdk-dev] [PATCH v2 2/6] vhost: introduce vhost_log_write Yuanhan Liu
2015-12-21 15:06     ` Xie, Huawei
2015-12-22  2:40       ` Yuanhan Liu
2015-12-22  2:45         ` Xie, Huawei
2015-12-22  3:04           ` Yuanhan Liu
2015-12-22  7:02             ` Xie, Huawei
2015-12-22  5:11     ` Peter Xu
2015-12-22  6:09       ` Yuanhan Liu
2015-12-17  3:11   ` [dpdk-dev] [PATCH v2 3/6] vhost: log used vring changes Yuanhan Liu
2015-12-22  6:55     ` Peter Xu
2015-12-22  7:07       ` Xie, Huawei
2015-12-22  7:59         ` Peter Xu
2015-12-22  7:13       ` Yuanhan Liu
2015-12-22  8:01         ` Peter Xu
2015-12-17  3:11   ` [dpdk-dev] [PATCH v2 4/6] vhost: log vring desc buffer changes Yuanhan Liu
2015-12-17  3:12   ` [dpdk-dev] [PATCH v2 5/6] vhost: claim that we support GUEST_ANNOUNCE feature Yuanhan Liu
2015-12-22  8:11     ` Peter Xu
2015-12-22  8:21       ` Yuanhan Liu
2015-12-22  8:24       ` Pavel Fedin
2015-12-17  3:12   ` [dpdk-dev] [PATCH v2 6/6] vhost: enable log_shmfd protocol feature Yuanhan Liu
2015-12-17 12:08   ` [dpdk-dev] [PATCH v2 0/6] vhost-user live migration support Iremonger, Bernard
2015-12-17 12:45     ` Yuanhan Liu
2015-12-21  8:17   ` Pavel Fedin
2016-01-29  4:57   ` [dpdk-dev] [PATCH v3 0/8] " Yuanhan Liu
2016-01-29  4:57     ` [dpdk-dev] [PATCH v3 1/8] vhost: handle VHOST_USER_SET_LOG_BASE request Yuanhan Liu
2016-01-29  4:57     ` [dpdk-dev] [PATCH v3 2/8] vhost: introduce vhost_log_write Yuanhan Liu
2016-02-19 14:26       ` Thomas Monjalon
2016-02-22  6:59         ` Yuanhan Liu
2016-01-29  4:57     ` [dpdk-dev] [PATCH v3 3/8] vhost: log used vring changes Yuanhan Liu
2016-01-29  4:57     ` [dpdk-dev] [PATCH v3 4/8] vhost: log vring desc buffer changes Yuanhan Liu
2016-01-29  4:58     ` [dpdk-dev] [PATCH v3 5/8] vhost: claim that we support GUEST_ANNOUNCE feature Yuanhan Liu
2016-03-11 12:39       ` Olivier MATZ
2016-03-11 13:16         ` Thomas Monjalon
2016-03-11 13:22           ` Olivier MATZ
2016-01-29  4:58     ` [dpdk-dev] [PATCH v3 6/8] vhost: handle VHOST_USER_SEND_RARP request Yuanhan Liu
2016-02-19  6:11       ` Tan, Jianfeng
2016-02-19  7:03         ` Yuanhan Liu
2016-02-19  8:55           ` Yuanhan Liu
2016-02-22 14:36           ` [dpdk-dev] [PATCH] vhost: broadcast RARP pkt by injecting it to receiving mbuf array Yuanhan Liu
2016-02-24  8:15             ` Qiu, Michael
2016-02-24  8:28               ` Yuanhan Liu
2016-02-25  7:55                 ` Qiu, Michael
2016-02-29 15:56             ` Thomas Monjalon
2016-01-29  4:58     ` [dpdk-dev] [PATCH v3 7/8] vhost: enable log_shmfd protocol feature Yuanhan Liu
2016-01-29  4:58     ` [dpdk-dev] [PATCH v3 8/8] vhost: remove duplicate header include Yuanhan Liu
2016-02-01 15:54     ` [dpdk-dev] [PATCH v3 0/8] vhost-user live migration support Iremonger, Bernard
2016-02-02  1:53       ` Yuanhan Liu
2016-02-19 15:01     ` Thomas Monjalon
2016-02-22  7:08       ` Yuanhan Liu
2016-02-22  9:56         ` Thomas Monjalon
2016-02-22 14:24           ` Yuanhan Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).