On Sun, 22 Jan 2017 16:51:18 +0800 Peter Xu <pet...@redhat.com> wrote:
> On Sun, Jan 22, 2017 at 03:56:10PM +0800, Jason Wang wrote: > > > > >+ trace_vtd_page_walk_one(level, entry.iova, > > >entry.translated_addr, > > >+ entry.addr_mask, entry.perm); > > >+ if (hook_fn) { > > >+ ret = hook_fn(&entry, private); > > > > For better performance, we could try to merge adjacent mappings here. I > > think both vfio and vhost support this and it can save a lot of ioctls. > > Looks so, and this is in my todo list. > > Do you mind I do it later after this series merged? I would really > appreciate if we can have this codes settled down first (considering > that this series has been dangling for half a year, or more, startint > from Aviv's series), and I am just afraid this will led to > unconvergence of this series (and I believe there are other places > that can be enhanced in the future as well). NAK, we can't merge mappings per my comment on 18/20. You're looking at an entirely new or at best revised version of the vfio IOMMU interface to do so. vfio does not support invalidations at a smaller granularity than the original mapping. Thanks, Alex