> From: Kunkun Jiang > Sent: Wednesday, March 10, 2021 5:41 PM > > Hi all, > > In the past, we clear dirty log immediately after sync dirty log to > userspace. This may cause redundant dirty handling if userspace > handles dirty log iteratively: > > After vfio clears dirty log, new dirty log starts to generate. These > new dirty log will be reported to userspace even if they are generated > before userspace handles the same dirty page. > > Since a new dirty log tracking method for vfio based on iommu hwdbm[1] > has been introduced in the kernel and added a new capability named > VFIO_DIRTY_LOG_MANUAL_CLEAR, we can eliminate some redundant dirty > handling by supporting it.
Is there any performance data showing the benefit of this new method? > > This series include patches as below: > Patch 1: > - updated the linux-headers/linux/vfio.h from kernel side > > Patch 2: > - introduced 'struct VFIODMARange' to describe a range of the given DMA > mapping and with respect to a VFIO_IOMMU_MAP_DMA operation > > Patch 3: > - implemented the operation to manual clear vfio dirty log, which can > eliminate some redundant dirty handling > > Thanks, > Kunkun Jiang > > [1] https://lore.kernel.org/linux-iommu/20210310090614.26668-1- > zhukeqi...@huawei.com/T/#mb168c9738ecd3d8794e2da14f970545d5820f > 863 > > Zenghui Yu (3): > linux-headers: update against 5.12-rc2 and "vfio log clear" series > vfio: Maintain DMA mapping range for the container > vfio/migration: Support VFIO_IOMMU_DIRTY_PAGES_FLAG_CLEAR_BITMAP > > hw/vfio/common.c | 207 ++++++++++++++++++++++++++++++++-- > include/hw/vfio/vfio-common.h | 10 ++ > linux-headers/linux/vfio.h | 55 ++++++++- > 3 files changed, 264 insertions(+), 8 deletions(-) > > -- > 2.23.0 >