From: "Gonglei (Arei)" <arei.gonglei@huawei.com> To: Zhao Yan <yan.y.zhao@intel.com> Cc: "cjia@nvidia.com" <cjia@nvidia.com>, "kvm@vger.kernel.org" <kvm@vger.kernel.org>, "aik@ozlabs.ru" <aik@ozlabs.ru>, "Zhengxiao.zx@Alibaba-inc.com" <Zhengxiao.zx@Alibaba-inc.com>, "shuangtai.tst@alibaba-inc.com" <shuangtai.tst@alibaba-inc.com>, "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>, "kwankhede@nvidia.com" <kwankhede@nvidia.com>, "eauger@redhat.com" <eauger@redhat.com>, "yi.l.liu@intel.com" <yi.l.liu@intel.com>, "eskultet@redhat.com" <eskultet@redhat.com>, "ziye.yang@intel.com" <ziye.yang@intel.com>, "mlevitsk@redhat.com" <mlevitsk@redhat.com>, "pasic@linux.ibm.com" <pasic@linux.ibm.com>, "felipe@nutanix.com" <felipe@nutanix.com>, "Ken.Xue@amd.com" <Ken.Xue@amd.com>, "kevin.tian@intel.com" <kevin.tian@intel.com>, "dgilbert@redhat.com" <dgilbert@redhat.com>, "alex.williamson@redhat.com" <alex.williamson@redhat.com>, "intel-gvt-dev@lists.freedesktop.org" <inte Subject: Re: [PATCH 0/5] QEMU VFIO live migration Date: Thu, 21 Feb 2019 01:35:43 +0000 [thread overview] Message-ID: <33183CC9F5247A488A2544077AF19020DB25E1F3@dggeml511-mbx.china.huawei.com> (raw) In-Reply-To: <20190221002444.GH16456@joy-OptiPlex-7040> > -----Original Message----- > From: Zhao Yan [mailto:yan.y.zhao@intel.com] > Sent: Thursday, February 21, 2019 8:25 AM > To: Gonglei (Arei) <arei.gonglei@huawei.com> > Cc: alex.williamson@redhat.com; qemu-devel@nongnu.org; > intel-gvt-dev@lists.freedesktop.org; Zhengxiao.zx@Alibaba-inc.com; > yi.l.liu@intel.com; eskultet@redhat.com; ziye.yang@intel.com; > cohuck@redhat.com; shuangtai.tst@alibaba-inc.com; dgilbert@redhat.com; > zhi.a.wang@intel.com; mlevitsk@redhat.com; pasic@linux.ibm.com; > aik@ozlabs.ru; eauger@redhat.com; felipe@nutanix.com; > jonathan.davies@nutanix.com; changpeng.liu@intel.com; Ken.Xue@amd.com; > kwankhede@nvidia.com; kevin.tian@intel.com; cjia@nvidia.com; > kvm@vger.kernel.org > Subject: Re: [PATCH 0/5] QEMU VFIO live migration > > On Wed, Feb 20, 2019 at 11:56:01AM +0000, Gonglei (Arei) wrote: > > Hi yan, > > > > Thanks for your work. > > > > I have some suggestions or questions: > > > > 1) Would you add msix mode support,? if not, pls add a check in > vfio_pci_save_config(), likes Nvidia's solution. > ok. > > > 2) We should start vfio devices before vcpu resumes, so we can't rely on vm > start change handler completely. > vfio devices is by default set to running state. > In the target machine, its state transition flow is running->stop->running. That's confusing. We should start vfio devices after vfio_load_state, otherwise how can you keep the devices' information are the same between source side and destination side? > so, maybe you can ignore the stop notification in kernel? > > 3) We'd better support live migration rollback since have many failure > scenarios, > > register a migration notifier is a good choice. > I think this patchset can also handle the failure case well. > if migration failure or cancelling happens, > in cleanup handler, LOGGING state is cleared. device state(running or > stopped) keeps as it is). IIRC there're many failure paths don't calling cleanup handler. > then, > if vm switches back to running, device state will be set to running; > if vm stayes at stopped state, device state is also stopped (it has no > meaning to let it in running state). > Do you think so ? > IF the underlying state machine is complicated, We should tell the canceling state to vendor driver proactively. > > 4) Four memory region for live migration is too complicated IMHO. > one big region requires the sub-regions well padded. > like for the first control fields, they have to be padded to 4K. > the same for other data fields. > Otherwise, mmap simply fails, because the start-offset and size for mmap > both need to be PAGE aligned. > But if we don't need use mmap for control filed and device state, they are small basically. The performance is enough using pread/pwrite. > Also, 4 regions is clearer in my view :) > > > 5) About log sync, why not register log_global_start/stop in > vfio_memory_listener? > > > > > seems log_global_start/stop cannot be iterately called in pre-copy phase? > for dirty pages in system memory, it's better to transfer dirty data > iteratively to reduce down time, right? > We just need invoking only once for start and stop logging. Why we need to call them literately? See memory_listener of vhost. Regards, -Gonglei
WARNING: multiple messages have this Message-ID (diff)
From: "Gonglei (Arei)" <arei.gonglei@huawei.com> To: Zhao Yan <yan.y.zhao@intel.com> Cc: "alex.williamson@redhat.com" <alex.williamson@redhat.com>, "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>, "intel-gvt-dev@lists.freedesktop.org" <intel-gvt-dev@lists.freedesktop.org>, "Zhengxiao.zx@Alibaba-inc.com" <Zhengxiao.zx@Alibaba-inc.com>, "yi.l.liu@intel.com" <yi.l.liu@intel.com>, "eskultet@redhat.com" <eskultet@redhat.com>, "ziye.yang@intel.com" <ziye.yang@intel.com>, "cohuck@redhat.com" <cohuck@redhat.com>, "shuangtai.tst@alibaba-inc.com" <shuangtai.tst@alibaba-inc.com>, "dgilbert@redhat.com" <dgilbert@redhat.com>, "zhi.a.wang@intel.com" <zhi.a.wang@intel.com>, "mlevitsk@redhat.com" <mlevitsk@redhat.com>, "pasic@linux.ibm.com" <pasic@linux.ibm.com>, "aik@ozlabs.ru" <aik@ozlabs.ru>, "eauger@redhat.com" <eauger@redhat.com>, "felipe@nutanix.com" <felipe@nutanix.com>, "jonathan.davies@nutanix.com" <jonathan.davies@nutanix.com>, "changpeng.liu@intel.com" <changpeng.liu@intel.com>, "Ken.Xue@amd.com" <Ken.Xue@amd.com>, "kwankhede@nvidia.com" <kwankhede@nvidia.com>, "kevin.tian@intel.com" <kevin.tian@intel.com>, "cjia@nvidia.com" <cjia@nvidia.com>, "kvm@vger.kernel.org" <kvm@vger.kernel.org> Subject: Re: [Qemu-devel] [PATCH 0/5] QEMU VFIO live migration Date: Thu, 21 Feb 2019 01:35:43 +0000 [thread overview] Message-ID: <33183CC9F5247A488A2544077AF19020DB25E1F3@dggeml511-mbx.china.huawei.com> (raw) In-Reply-To: <20190221002444.GH16456@joy-OptiPlex-7040> > -----Original Message----- > From: Zhao Yan [mailto:yan.y.zhao@intel.com] > Sent: Thursday, February 21, 2019 8:25 AM > To: Gonglei (Arei) <arei.gonglei@huawei.com> > Cc: alex.williamson@redhat.com; qemu-devel@nongnu.org; > intel-gvt-dev@lists.freedesktop.org; Zhengxiao.zx@Alibaba-inc.com; > yi.l.liu@intel.com; eskultet@redhat.com; ziye.yang@intel.com; > cohuck@redhat.com; shuangtai.tst@alibaba-inc.com; dgilbert@redhat.com; > zhi.a.wang@intel.com; mlevitsk@redhat.com; pasic@linux.ibm.com; > aik@ozlabs.ru; eauger@redhat.com; felipe@nutanix.com; > jonathan.davies@nutanix.com; changpeng.liu@intel.com; Ken.Xue@amd.com; > kwankhede@nvidia.com; kevin.tian@intel.com; cjia@nvidia.com; > kvm@vger.kernel.org > Subject: Re: [PATCH 0/5] QEMU VFIO live migration > > On Wed, Feb 20, 2019 at 11:56:01AM +0000, Gonglei (Arei) wrote: > > Hi yan, > > > > Thanks for your work. > > > > I have some suggestions or questions: > > > > 1) Would you add msix mode support,? if not, pls add a check in > vfio_pci_save_config(), likes Nvidia's solution. > ok. > > > 2) We should start vfio devices before vcpu resumes, so we can't rely on vm > start change handler completely. > vfio devices is by default set to running state. > In the target machine, its state transition flow is running->stop->running. That's confusing. We should start vfio devices after vfio_load_state, otherwise how can you keep the devices' information are the same between source side and destination side? > so, maybe you can ignore the stop notification in kernel? > > 3) We'd better support live migration rollback since have many failure > scenarios, > > register a migration notifier is a good choice. > I think this patchset can also handle the failure case well. > if migration failure or cancelling happens, > in cleanup handler, LOGGING state is cleared. device state(running or > stopped) keeps as it is). IIRC there're many failure paths don't calling cleanup handler. > then, > if vm switches back to running, device state will be set to running; > if vm stayes at stopped state, device state is also stopped (it has no > meaning to let it in running state). > Do you think so ? > IF the underlying state machine is complicated, We should tell the canceling state to vendor driver proactively. > > 4) Four memory region for live migration is too complicated IMHO. > one big region requires the sub-regions well padded. > like for the first control fields, they have to be padded to 4K. > the same for other data fields. > Otherwise, mmap simply fails, because the start-offset and size for mmap > both need to be PAGE aligned. > But if we don't need use mmap for control filed and device state, they are small basically. The performance is enough using pread/pwrite. > Also, 4 regions is clearer in my view :) > > > 5) About log sync, why not register log_global_start/stop in > vfio_memory_listener? > > > > > seems log_global_start/stop cannot be iterately called in pre-copy phase? > for dirty pages in system memory, it's better to transfer dirty data > iteratively to reduce down time, right? > We just need invoking only once for start and stop logging. Why we need to call them literately? See memory_listener of vhost. Regards, -Gonglei
next prev parent reply other threads:[~2019-02-21 1:35 UTC|newest] Thread overview: 133+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-02-19 8:50 [PATCH 0/5] QEMU VFIO live migration Yan Zhao 2019-02-19 8:50 ` [Qemu-devel] " Yan Zhao 2019-02-19 8:52 ` [PATCH 1/5] vfio/migration: define kernel interfaces Yan Zhao 2019-02-19 8:52 ` [Qemu-devel] " Yan Zhao 2019-02-19 13:09 ` Cornelia Huck 2019-02-19 13:09 ` [Qemu-devel] " Cornelia Huck 2019-02-20 7:36 ` Zhao Yan 2019-02-20 7:36 ` [Qemu-devel] " Zhao Yan 2019-02-20 17:08 ` Cornelia Huck 2019-02-20 17:08 ` [Qemu-devel] " Cornelia Huck 2019-02-21 1:47 ` Zhao Yan 2019-02-21 1:47 ` [Qemu-devel] " Zhao Yan 2019-02-19 8:52 ` [PATCH 2/5] vfio/migration: support device of device config capability Yan Zhao 2019-02-19 8:52 ` [Qemu-devel] " Yan Zhao 2019-02-19 11:01 ` Dr. David Alan Gilbert 2019-02-19 11:01 ` [Qemu-devel] " Dr. David Alan Gilbert 2019-02-20 5:12 ` Zhao Yan 2019-02-20 5:12 ` [Qemu-devel] " Zhao Yan 2019-02-20 10:57 ` Dr. David Alan Gilbert 2019-02-20 10:57 ` [Qemu-devel] " Dr. David Alan Gilbert 2019-02-19 14:37 ` Cornelia Huck 2019-02-19 14:37 ` [Qemu-devel] " Cornelia Huck 2019-02-20 22:54 ` Zhao Yan 2019-02-20 22:54 ` [Qemu-devel] " Zhao Yan 2019-02-21 10:56 ` Cornelia Huck 2019-02-21 10:56 ` [Qemu-devel] " Cornelia Huck 2019-02-19 8:52 ` [PATCH 3/5] vfio/migration: tracking of dirty page in system memory Yan Zhao 2019-02-19 8:52 ` [Qemu-devel] " Yan Zhao 2019-02-19 8:52 ` [PATCH 4/5] vfio/migration: turn on migration Yan Zhao 2019-02-19 8:52 ` [Qemu-devel] " Yan Zhao 2019-02-19 8:53 ` [PATCH 5/5] vfio/migration: support device memory capability Yan Zhao 2019-02-19 8:53 ` [Qemu-devel] " Yan Zhao 2019-02-19 11:25 ` Dr. David Alan Gilbert 2019-02-19 11:25 ` [Qemu-devel] " Dr. David Alan Gilbert 2019-02-20 5:17 ` Zhao Yan 2019-02-20 5:17 ` [Qemu-devel] " Zhao Yan 2019-02-19 14:42 ` Christophe de Dinechin 2019-02-19 14:42 ` [Qemu-devel] " Christophe de Dinechin 2019-02-20 7:58 ` Zhao Yan 2019-02-20 7:58 ` [Qemu-devel] " Zhao Yan 2019-02-20 10:14 ` Christophe de Dinechin 2019-02-20 10:14 ` [Qemu-devel] " Christophe de Dinechin 2019-02-21 0:07 ` Zhao Yan 2019-02-21 0:07 ` [Qemu-devel] " Zhao Yan 2019-02-19 11:32 ` [PATCH 0/5] QEMU VFIO live migration Dr. David Alan Gilbert 2019-02-19 11:32 ` [Qemu-devel] " Dr. David Alan Gilbert 2019-02-20 5:28 ` Zhao Yan 2019-02-20 5:28 ` [Qemu-devel] " Zhao Yan 2019-02-20 11:01 ` Dr. David Alan Gilbert 2019-02-20 11:01 ` [Qemu-devel] " Dr. David Alan Gilbert 2019-02-20 11:28 ` Gonglei (Arei) 2019-02-20 11:28 ` [Qemu-devel] " Gonglei (Arei) 2019-02-20 11:42 ` Cornelia Huck 2019-02-20 11:42 ` [Qemu-devel] " Cornelia Huck 2019-02-20 12:07 ` Gonglei (Arei) 2019-02-20 12:07 ` [Qemu-devel] " Gonglei (Arei) 2019-03-27 6:35 ` Zhao Yan 2019-03-27 20:18 ` Dr. David Alan Gilbert 2019-03-27 22:10 ` Alex Williamson 2019-03-28 8:36 ` Zhao Yan 2019-03-28 9:21 ` Erik Skultety 2019-03-28 16:04 ` Alex Williamson 2019-03-29 2:47 ` Zhao Yan 2019-03-29 14:26 ` Alex Williamson 2019-03-29 23:10 ` Zhao Yan 2019-03-30 14:14 ` Alex Williamson 2019-04-01 2:17 ` Zhao Yan 2019-04-01 8:14 ` Cornelia Huck 2019-04-01 8:14 ` [Qemu-devel] " Cornelia Huck 2019-04-01 8:40 ` Yan Zhao 2019-04-01 8:40 ` [Qemu-devel] " Yan Zhao 2019-04-01 14:15 ` Alex Williamson 2019-04-01 14:15 ` [Qemu-devel] " Alex Williamson 2019-02-21 0:31 ` Zhao Yan 2019-02-21 0:31 ` [Qemu-devel] " Zhao Yan 2019-02-21 9:15 ` Dr. David Alan Gilbert 2019-02-21 9:15 ` [Qemu-devel] " Dr. David Alan Gilbert 2019-02-20 11:56 ` Gonglei (Arei) 2019-02-20 11:56 ` [Qemu-devel] " Gonglei (Arei) 2019-02-21 0:24 ` Zhao Yan 2019-02-21 0:24 ` [Qemu-devel] " Zhao Yan 2019-02-21 1:35 ` Gonglei (Arei) [this message] 2019-02-21 1:35 ` Gonglei (Arei) 2019-02-21 1:58 ` Zhao Yan 2019-02-21 1:58 ` [Qemu-devel] " Zhao Yan 2019-02-21 3:33 ` Gonglei (Arei) 2019-02-21 3:33 ` [Qemu-devel] " Gonglei (Arei) 2019-02-21 4:08 ` Zhao Yan 2019-02-21 4:08 ` [Qemu-devel] " Zhao Yan 2019-02-21 5:46 ` Gonglei (Arei) 2019-02-21 5:46 ` [Qemu-devel] " Gonglei (Arei) 2019-02-21 2:04 ` Zhao Yan 2019-02-21 2:04 ` [Qemu-devel] " Zhao Yan 2019-02-21 3:16 ` Gonglei (Arei) 2019-02-21 3:16 ` [Qemu-devel] " Gonglei (Arei) 2019-02-21 4:21 ` Zhao Yan 2019-02-21 4:21 ` [Qemu-devel] " Zhao Yan 2019-02-21 5:56 ` Gonglei (Arei) 2019-02-21 5:56 ` [Qemu-devel] " Gonglei (Arei) 2019-02-21 20:40 ` Alex Williamson 2019-02-21 20:40 ` [Qemu-devel] " Alex Williamson 2019-02-25 2:22 ` Zhao Yan 2019-02-25 2:22 ` [Qemu-devel] " Zhao Yan 2019-03-06 0:22 ` Zhao Yan 2019-03-06 0:22 ` [Qemu-devel] " Zhao Yan 2019-03-07 17:44 ` Alex Williamson 2019-03-07 17:44 ` [Qemu-devel] " Alex Williamson 2019-03-07 23:20 ` Tian, Kevin 2019-03-07 23:20 ` [Qemu-devel] " Tian, Kevin 2019-03-08 16:11 ` Alex Williamson 2019-03-08 16:11 ` [Qemu-devel] " Alex Williamson 2019-03-08 16:21 ` Dr. David Alan Gilbert 2019-03-08 16:21 ` [Qemu-devel] " Dr. David Alan Gilbert 2019-03-08 22:02 ` Alex Williamson 2019-03-08 22:02 ` [Qemu-devel] " Alex Williamson 2019-03-11 2:33 ` Tian, Kevin 2019-03-11 2:33 ` [Qemu-devel] " Tian, Kevin 2019-03-11 20:19 ` Alex Williamson 2019-03-11 20:19 ` [Qemu-devel] " Alex Williamson 2019-03-12 2:48 ` Tian, Kevin 2019-03-12 2:48 ` [Qemu-devel] " Tian, Kevin 2019-03-13 19:57 ` Alex Williamson 2019-03-12 2:57 ` Zhao Yan 2019-03-12 2:57 ` [Qemu-devel] " Zhao Yan 2019-03-13 1:13 ` Zhao Yan 2019-03-13 19:14 ` Alex Williamson 2019-03-14 1:12 ` Zhao Yan 2019-03-14 22:44 ` Alex Williamson 2019-03-14 23:05 ` Zhao Yan 2019-03-15 2:24 ` Alex Williamson 2019-03-18 2:51 ` Zhao Yan 2019-03-18 3:09 ` Alex Williamson 2019-03-18 3:27 ` Zhao Yan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=33183CC9F5247A488A2544077AF19020DB25E1F3@dggeml511-mbx.china.huawei.com \ --to=arei.gonglei@huawei.com \ --cc=Ken.Xue@amd.com \ --cc=Zhengxiao.zx@Alibaba-inc.com \ --cc=aik@ozlabs.ru \ --cc=alex.williamson@redhat.com \ --cc=cjia@nvidia.com \ --cc=dgilbert@redhat.com \ --cc=eauger@redhat.com \ --cc=eskultet@redhat.com \ --cc=felipe@nutanix.com \ --cc=kevin.tian@intel.com \ --cc=kvm@vger.kernel.org \ --cc=kwankhede@nvidia.com \ --cc=mlevitsk@redhat.com \ --cc=pasic@linux.ibm.com \ --cc=qemu-devel@nongnu.org \ --cc=shuangtai.tst@alibaba-inc.com \ --cc=yan.y.zhao@intel.com \ --cc=yi.l.liu@intel.com \ --cc=ziye.yang@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.