On Tue, Jul 30, 2019 at 08:51:57AM +0300, Christoph Hellwig wrote: > All users pass PAGE_SIZE here, and if we wanted to support single > entries for huge pages we should really just add a HMM_FAULT_HUGEPAGE > flag instead that uses the huge page size instead of having the > caller calculate that size once, just for the hmm code to verify it. I suspect this was added for the ODP conversion that does use both page sizes. I think the ODP code for this is kind of broken, but I haven't delved into that.. The challenge is that the driver needs to know what page size to configure the hardware before it does any range stuff. The other challenge is that the HW is configured to do only one page size, and if the underlying CPU page side changes it goes south. What I would prefer is if the driver could somehow dynamically adjust the the page size after each dma map, but I don't know if ODP HW can do that. Since this is all driving toward making ODP use this maybe we should keep this API? I'm not sure I can loose the crappy huge page support in ODP. Jason