qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Xiang Zheng <zhengxiang9@huawei.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: cjia@nvidia.com, kvm@vger.kernel.org, aik@ozlabs.ru,
	Zhengxiao.zx@Alibaba-inc.com, shuangtai.tst@alibaba-inc.com,
	qemu-devel@nongnu.org, Kirti Wankhede <kwankhede@nvidia.com>,
	eauger@redhat.com, yi.l.liu@intel.com, eskultet@redhat.com,
	ziye.yang@intel.com, mlevitsk@redhat.com, pasic@linux.ibm.com,
	felipe@nutanix.com, Wang Haibin <wanghaibin.wang@huawei.com>,
	zhi.a.wang@intel.com, kevin.tian@intel.com, yan.y.zhao@intel.com,
	dgilbert@redhat.com, changpeng.liu@intel.com, cohuck@redhat.com,
	Ken.Xue@amd.com, jonathan.davies@nutanix.com
Subject: Re: [PATCH Kernel v24 0/8] Add UAPIs to support migration for VFIO devices
Date: Wed, 22 Jul 2020 10:55:53 +0800	[thread overview]
Message-ID: <3351a7d0-4fb1-a902-b902-a638a3d3047a@huawei.com> (raw)
In-Reply-To: <20200721164304.0ce76b2e@x1.home>

Hi Alex,

Thank you for your suggestion.

On 2020/7/22 6:43, Alex Williamson wrote:
> On Tue, 21 Jul 2020 10:43:21 +0800
> Xiang Zheng <zhengxiang9@huawei.com> wrote:
> 
>> Hi Kirti,
>>
>> Sorry to disturb you since this patch set has been merged, and I cannot
>> receive the qemu-side emails about this patch set.
>>
>> We are going to support migration for VFIO devices which support dirty
>> pages tracking.
>>
>> And we also plan to leverage SMMU HTTU feature to do the dirty pages
>> tracking for the devices which don't support dirty pages tracking.
>>
>> For the above two cases, which side determines to choose IOMMU driver or
>> vendor driver to do dirty bitmap tracking, Qemu or VFIO?
>>
>> In brief, if both IOMMU and VFIO devices support dirty pages tracking,
>> we can check the capability and prefer to track dirty pages on device
>> vendor driver which is more efficient.
>>
>> The qusetion is which side to do the check and selection? In my opinion,
>> Qemu/userspace seems more suitable.
> 
> Dirty page tracking is consolidated at the vfio container level.
> Userspace has no basis for determining or interface for selecting a
> dirty bitmap provider, so I would disagree that QEMU should play any
> role here.  The container dirty bitmap tries to provide the finest
> granularity available based on the support of all the devices/groups
> managed by the container.  If there are groups attached to the
> container that have not participated in page pinning, then we consider
> all DMA mappings within the container as persistently dirty.  Once all
> of the participants subscribe to page pinning, the dirty scope is
> reduced to the pinned pages.  IOMMU support for dirty page logging would
> introduce finer granularity yet, which we would probably prefer over
> page pinning, but interfaces for this have not been devised.

Kevin and his colleagues may add these APIs in the future.
We also plan to support these interfaces on SMMU driver and afterwards we
can have a further discussion.

> 
> Ideally userspace should be unaware of any of this, the benefit would
> be seen transparently by having a more sparsely filled dirty bitmap,
> which more accurately reflects how memory is actually being dirtied.

Yes, indeed.

-- 
Thanks,
Xiang



  reply	other threads:[~2020-07-22  2:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 20:30 [PATCH Kernel v24 0/8] Add UAPIs to support migration for VFIO devices Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 1/8] vfio: UAPI for migration interface for device state Kirti Wankhede
2020-09-28 16:51   ` Stefan Hajnoczi
2020-05-28 20:30 ` [PATCH Kernel v24 2/8] vfio iommu: Remove atomicity of ref_count of pinned pages Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 3/8] vfio iommu: Cache pgsize_bitmap in struct vfio_iommu Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 4/8] vfio iommu: Add ioctl definition for dirty pages tracking Kirti Wankhede
2020-09-28 17:06   ` Stefan Hajnoczi
2020-05-28 20:30 ` [PATCH Kernel v24 5/8] vfio iommu: Implementation of ioctl " Kirti Wankhede
2020-06-02 15:51   ` Kirti Wankhede
2020-06-02 16:44     ` Alex Williamson
2020-05-28 20:30 ` [PATCH Kernel v24 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 7/8] vfio iommu: Add migration capability to report supported features Kirti Wankhede
2020-05-28 20:30 ` [PATCH Kernel v24 8/8] vfio: Selective dirty page tracking if IOMMU backed device pins pages Kirti Wankhede
2020-05-29 21:09 ` [PATCH Kernel v24 0/8] Add UAPIs to support migration for VFIO devices Alex Williamson
2020-07-21  2:43 ` Xiang Zheng
2020-07-21 22:43   ` Alex Williamson
2020-07-22  2:55     ` Xiang Zheng [this message]
2020-07-22  3:24       ` Tian, Kevin
2020-09-29  8:27 ` Stefan Hajnoczi
2020-09-29 19:52   ` Alex Williamson

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=3351a7d0-4fb1-a902-b902-a638a3d3047a@huawei.com \
    --to=zhengxiang9@huawei.com \
    --cc=Ken.Xue@amd.com \
    --cc=Zhengxiao.zx@Alibaba-inc.com \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=changpeng.liu@intel.com \
    --cc=cjia@nvidia.com \
    --cc=cohuck@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eauger@redhat.com \
    --cc=eskultet@redhat.com \
    --cc=felipe@nutanix.com \
    --cc=jonathan.davies@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=wanghaibin.wang@huawei.com \
    --cc=yan.y.zhao@intel.com \
    --cc=yi.l.liu@intel.com \
    --cc=zhi.a.wang@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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).