On Tue, Jun 05, 2018 at 06:33:04PM -0700, Dan Williams wrote: > Unless the nouveau patches are using the entirety of what is already > upstream for HMM, we should look to pare HMM back. > > There is plenty of precedent of building a large capability > out-of-tree and piecemeal merging it later, so I do not buy the > "chicken-egg" argument. The change in the export is to make sure we > don't repeat this backward "merge first, ask questions later" mistake > in the future as devm_memremap_pages() is continuing to find new users > like peer-to-peer DMA support and Linux is better off if that > development is upstream. From a purely technical standpoint > devm_memremap_pages() is EXPORT_SYMBOL_GPL because it hacks around > several implementation details in the core kernel to achieve its goal, > and it leaks new assumptions all over the kernel. It is strictly not a > self contained interface. Agreed with all of that. And remember EXPORT_SYMBOL_GPL really just is a clear expression of the authors they think these are internals. The lack of it doesn't make it any less a derived work, we just remove a very clear hint to users that they are poking very deeply into internals. And with HMM they very clearly do.