On Mon, 24 Apr 2023 17:22:46 +0200 David Marchand <david.march...@redhat.com> wrote:
> > > > > > > Thanks, I can reproduce this issue with regular devices too (run testpmd > > with no devices, bind a NIC to VFIO, attach it, then quit). You're > > correct in that since the initial mapping was done with mapping large > > contiguous zones (such as when mempools are created before attach), any > > subsequent freeing of memory will cause these errors to happen. > > > > I don't think this can be fixed by anything other than not doing the > > contiguous mapping thing, so provisionally, I think this patch should be > > accepted. I'll play around with it some more and get back to you :) > > Can we conclude on this topic? > It is best we merge this kind of change the sooner possible for a release. > > Thanks. Shouldn't the coalesced mappings be able to have correct datastructure (accounting) so that on shutdown the unmap's are done for the right size?