Re: [PATCH 07/13] mm: remove the page_shift member from struct hmm_range

2019-08-01 Thread Christoph Hellwig
On Tue, Jul 30, 2019 at 05:50:16PM +, Jason Gunthorpe wrote: > The way ODP seems to work is once in hugetlb mode the dma addresses > must give huge pages or the page fault will be failed. I think that is > a terrible design, but this is how the driver is .. > > So, from this HMM perspective if

Re: [PATCH 07/13] mm: remove the page_shift member from struct hmm_range

2019-07-31 Thread Kuehling, Felix
On 2019-07-30 1:51 a.m., 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

Re: [PATCH 07/13] mm: remove the page_shift member from struct hmm_range

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 03:14:30PM +0200, Christoph Hellwig wrote: > On Tue, Jul 30, 2019 at 12:55:17PM +, Jason Gunthorpe wrote: > > 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

Re: [PATCH 07/13] mm: remove the page_shift member from struct hmm_range

2019-07-30 Thread Jason Gunthorpe
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 si

Re: [PATCH 07/13] mm: remove the page_shift member from struct hmm_range

2019-07-30 Thread Christoph Hellwig
On Tue, Jul 30, 2019 at 12:55:17PM +, Jason Gunthorpe wrote: > 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

[PATCH 07/13] mm: remove the page_shift member from struct hmm_range

2019-07-30 Thread Christoph Hellwig
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. Signed-off-by: Christoph Hell