Re: [PATCH 2/3] pagewalk: separate function pointers from iterator data

2019-09-02 Thread Jason Gunthorpe
On Mon, Sep 02, 2019 at 09:58:59AM +0200, Christoph Hellwig wrote: > On Mon, Sep 02, 2019 at 05:51:58AM +, Jason Gunthorpe wrote: > > On Sun, Sep 01, 2019 at 01:35:16PM -0700, Guenter Roeck wrote: > > > > I belive the macros above are missing brackets.. Can you confirm the > > > > below takes c

Re: [PATCH 2/3] pagewalk: separate function pointers from iterator data

2019-09-02 Thread Christoph Hellwig
On Mon, Sep 02, 2019 at 05:51:58AM +, Jason Gunthorpe wrote: > On Sun, Sep 01, 2019 at 01:35:16PM -0700, Guenter Roeck wrote: > > > I belive the macros above are missing brackets.. Can you confirm the > > > below takes care of things? I'll add a patch if so > > > > > > > Good catch. Yes, that

Re: [PATCH 2/3] pagewalk: separate function pointers from iterator data

2019-09-01 Thread Jason Gunthorpe
On Sun, Sep 01, 2019 at 01:35:16PM -0700, Guenter Roeck wrote: > > I belive the macros above are missing brackets.. Can you confirm the > > below takes care of things? I'll add a patch if so > > > > Good catch. Yes, that fixes the build problem. I added this to the hmm tree to fix it: >From 6a7

Re: [PATCH 2/3] pagewalk: separate function pointers from iterator data

2019-09-01 Thread Guenter Roeck
On 9/1/19 12:36 PM, Jason Gunthorpe wrote: On Sun, Sep 01, 2019 at 11:45:30AM -0700, Guenter Roeck wrote: On Wed, Aug 28, 2019 at 04:19:54PM +0200, Christoph Hellwig wrote: The mm_walk structure currently mixed data and code. Split out the operations vectors into a new mm_walk_ops structure, a

Re: [PATCH 2/3] pagewalk: separate function pointers from iterator data

2019-09-01 Thread Jason Gunthorpe
On Sun, Sep 01, 2019 at 11:45:30AM -0700, Guenter Roeck wrote: > On Wed, Aug 28, 2019 at 04:19:54PM +0200, Christoph Hellwig wrote: > > The mm_walk structure currently mixed data and code. Split out the > > operations vectors into a new mm_walk_ops structure, and while we > > are changing the API

Re: [PATCH 2/3] pagewalk: separate function pointers from iterator data

2019-09-01 Thread Guenter Roeck
On Wed, Aug 28, 2019 at 04:19:54PM +0200, Christoph Hellwig wrote: > The mm_walk structure currently mixed data and code. Split out the > operations vectors into a new mm_walk_ops structure, and while we > are changing the API also declare the mm_walk structure inside the > walk_page_range and wal

Re: [PATCH 2/3] pagewalk: separate function pointers from iterator data

2019-08-29 Thread Christoph Hellwig
On Wed, Aug 28, 2019 at 03:05:19PM +, Jason Gunthorpe wrote: > > @@ -1217,7 +1222,8 @@ static ssize_t clear_refs_write(struct file *file, > > const char __user *buf, > > 0, NULL, mm, 0, -1UL); > > mmu_notifier_invalidate_range_sta

Re: [PATCH 2/3] pagewalk: separate function pointers from iterator data

2019-08-28 Thread Jason Gunthorpe
On Wed, Aug 28, 2019 at 04:19:54PM +0200, Christoph Hellwig wrote: > @@ -2546,7 +2542,7 @@ int s390_enable_sie(void) > mm->context.has_pgste = 1; > /* split thp mappings and disable thp for future mappings */ > thp_split_mm(mm); > - zap_zero_pages(mm); > + walk_page_range(

[PATCH 2/3] pagewalk: separate function pointers from iterator data

2019-08-28 Thread Christoph Hellwig
The mm_walk structure currently mixed data and code. Split out the operations vectors into a new mm_walk_ops structure, and while we are changing the API also declare the mm_walk structure inside the walk_page_range and walk_page_vma functions. Based on patch from Linus Torvalds. Signed-off-by: