On Wed, Sep 26, 2018 at 11:25:37AM -0700, Alexander Duyck wrote:
With that said I am open to suggestions if you still feel like I need
follow this up with some additional work. I just want to avoid introducing
any regressions in regards to functionality or performance.
the problem I see is that devm/hmm is using some of the memory-hotplug
features, but their paths are becoming more and more diverged with changes
like this, and that is sometimes a problem when we need to change
something in the generic memory-hotplug code.
E.g: I am trying to fix two issues in the memory-hotplug where we can
access steal pages if we hot-remove memory before online it.
That was not so difficult to fix, but I really struggled with the exceptions
that HMM/devm represent in this regard, for instance, regarding the resources.
The RFCv2 can be found here  https://patchwork.kernel.org/patch/10569083/
And the initial discussion with Jerome Glisse can be found here .
So it would be great to stick to the memory-hotplug path as much as possible,
otherwise when a problem arises, we need to think how we can workaround