From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CB3755A86 for ; Thu, 17 Dec 2015 13:08:34 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 17 Dec 2015 04:08:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,440,1444719600"; d="scan'208";a="873456755" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by orsmga002.jf.intel.com with ESMTP; 17 Dec 2015 04:08:15 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.23]) by IRSMSX107.ger.corp.intel.com ([169.254.10.124]) with mapi id 14.03.0248.002; Thu, 17 Dec 2015 12:08:14 +0000 From: "Iremonger, Bernard" To: Yuanhan Liu , "dev@dpdk.org" Thread-Topic: [PATCH v2 0/6] vhost-user live migration support Thread-Index: AQHROHiv/KUZUNs4OEuWN7oywa2Rn57PE/tQ Date: Thu, 17 Dec 2015 12:08:13 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C219F906F1@IRSMSX108.ger.corp.intel.com> References: <1449027793-30975-1-git-send-email-yuanhan.liu@linux.intel.com> <1450321921-27799-1-git-send-email-yuanhan.liu@linux.intel.com> In-Reply-To: <1450321921-27799-1-git-send-email-yuanhan.liu@linux.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTllNWQxMjYtNjFlYy00NGE4LTkyYWUtYTU4MWEyYzA5YjM1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS40LjEwLjE5IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjZlcDNVdGdhXC9vKzd2Z2daeFhxenJBM3BuZFVFRFwvb3FYVE5rTEFBa284ND0ifQ== x-ctpclassification: CTP_PUBLIC x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "Michael S. Tsirkin" , "Yang, Maggie" , Victor Kaplansky Subject: Re: [dpdk-dev] [PATCH v2 0/6] vhost-user live migration support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2015 12:08:35 -0000 Hi Yuanhan, > -----Original Message----- > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > Sent: Thursday, December 17, 2015 3:12 AM > To: dev@dpdk.org > Cc: Xie, Huawei ; Michael S. Tsirkin > ; Victor Kaplansky ; Iremonger, > Bernard ; Pavel Fedin > ; Peter Xu ; Yuanhan Liu > ; Chen, Zhihui ; > Yang, Maggie > Subject: [PATCH v2 0/6] vhost-user live migration support >=20 > This patch set adds the vhost-user live migration support. >=20 > The major task behind that is to log pages we touched during live migrati= on, > including used vring and desc buffer. So, this patch set is basically abo= ut > adding vhost log support, and using it. >=20 > Patchset > =3D=3D=3D=3D=3D=3D=3D=3D > - Patch 1 handles VHOST_USER_SET_LOG_BASE, which tells us where > the dirty memory bitmap is. >=20 > - Patch 2 introduces a vhost_log_write() helper function to log > pages we are gonna change. >=20 > - Patch 3 logs changes we made to used vring. >=20 > - Patch 4 logs changes we made to vring desc buffer. >=20 > - Patch 5 and 6 add some feature bits related to live migration. >=20 > =20 The follow test guide should probably be added the DPDK doc files. It could be added to the sample app guide or the programmers guide. There is already a Vhost Library section in the programmers guide and A Vhost Sample Application section in the sample app guide. > A simple test guide (on same host) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > The following test is based on OVS + DPDK (check [0] for how to setup OVS= + > DPDK): >=20 > [0]: http://wiki.qemu.org/Features/vhost-user-ovs-dpdk >=20 > Here is the rough test guide: >=20 > 1. start ovs-vswitchd >=20 > 2. Add two ovs vhost-user port, say vhost0 and vhost1 >=20 > 3. Start a VM1 to connect to vhost0. Here is my example: >=20 > $ $QEMU -enable-kvm -m 1024 -smp 4 \ > -chardev socket,id=3Dchar0,path=3D/var/run/openvswitch/vhost0 \ > -netdev type=3Dvhost-user,id=3Dmynet1,chardev=3Dchar0,vhostforce \ > -device virtio-net-pci,netdev=3Dmynet1,mac=3D52:54:00:12:34:58 \ > -object memory-backend-file,id=3Dmem,size=3D1024M,mem- > path=3D$HOME/hugetlbfs,share=3Don \ > -numa node,memdev=3Dmem -mem-prealloc \ > -kernel $HOME/iso/vmlinuz -append "root=3D/dev/sda1" \ > -hda fc-19-i386.img \ > -monitor telnet::3333,server,nowait -curses >=20 > 4. run "ping $host" inside VM1 >=20 > 5. Start VM2 to connect to vhost0, and marking it as the target > of live migration (by adding -incoming tcp:0:4444 option) >=20 > $ $QEMU -enable-kvm -m 1024 -smp 4 \ > -chardev socket,id=3Dchar0,path=3D/var/run/openvswitch/vhost1 \ > -netdev type=3Dvhost-user,id=3Dmynet1,chardev=3Dchar0,vhostforce \ > -device virtio-net-pci,netdev=3Dmynet1,mac=3D52:54:00:12:34:58 \ > -object memory-backend-file,id=3Dmem,size=3D1024M,mem- > path=3D$HOME/hugetlbfs,share=3Don \ > -numa node,memdev=3Dmem -mem-prealloc \ > -kernel $HOME/iso/vmlinuz -append "root=3D/dev/sda1" \ > -hda fc-19-i386.img \ > -monitor telnet::3334,server,nowait -curses \ > -incoming tcp:0:4444 >=20 > 6. connect to VM1 monitor, and start migration: >=20 > > migrate tcp:0:4444 >=20 > 7. After a while, you will find that VM1 has been migrated to VM2, > and the "ping" command continues running, perfectly. >=20 >=20 > Cc: Chen Zhihui > Cc: Yang Maggie > --- > Yuanhan Liu (6): > vhost: handle VHOST_USER_SET_LOG_BASE request > vhost: introduce vhost_log_write > vhost: log used vring changes > vhost: log vring desc buffer changes > vhost: claim that we support GUEST_ANNOUNCE feature > vhost: enable log_shmfd protocol feature >=20 > lib/librte_vhost/rte_virtio_net.h | 36 ++++++++++- > lib/librte_vhost/vhost_rxtx.c | 88 +++++++++++++++++++--= ------ > 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 | 48 +++++++++++++++ > lib/librte_vhost/vhost_user/virtio-net-user.h | 5 +- > lib/librte_vhost/virtio-net.c | 5 ++ > 7 files changed, 165 insertions(+), 30 deletions(-) >=20 > -- > 1.9.0 Regards, Bernard.