On 2/7/2023 8:56 AM, Gupta, Nipun wrote:
[AMD Official Use Only - General]

Hi David,

I agree that change is not straightforward to review, but it should not cause 
any functional issue as we are still creating all the memory mappings, but one 
by one for each segment.
For hot plug case this causes issue as mentioned, that VFIO does not allow 
unmap of the individual segments in case mapping was created of a single 
coalesced segment.

But yes, I am not sure why this code was added, which Anatoly may have more 
understanding on.

The motivation behind this code was that Linux allows limited amount of page mappings, so we were trying to save on those. However, since then there have been a few changes related to partial unmaps that may make it so that this code is not only no longer necessary, but is in fact actively harmful. I agree that this at least warrants a second look.


Anatoly,

Can you please provide your feedback on this change?

The patch probably shouldn't include the mailmap changes :)

Could you please provide some steps to reproduce the hotplug issue you're having? It would be great to have a test case for this patchset to put it in context.

--
Thanks,
Anatoly

Reply via email to