Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-06-22 Thread Andrea Arcangeli
Hello everyone, On Wed, May 22, 2019 at 02:18:03PM -0700, Andrew Morton wrote: > > arch/x86/kernel/fpu/signal.c:198:8-31: -> gup with !pages This simply had not to return -EFAULT if ret < nr_pages.. but ret >= 0. Instead it did: if (ret == nr_pages) goto r

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-26 Thread Hugh Dickins
On Sun, 26 May 2019, Sebastian Andrzej Siewior wrote: > > Okay. The GUP functions are not properly documented for my taste. There > is no indication whether or not the mm_sem has to be acquired prior > invoking it. Following the call chain of get_user_pages() I ended up in > __get_user_pages_locke

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-26 Thread Sebastian Andrzej Siewior
On 2019-05-25 11:09:15 [-0700], Hugh Dickins wrote: > On Sat, 25 May 2019, Sebastian Andrzej Siewior wrote: > > On 2019-05-24 15:22:51 [-0700], Hugh Dickins wrote: > > > I've now run a couple of hours of load successfully with Mike's patch > > > to GUP, no problem; but whatever the merits of that p

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-26 Thread Pavel Machek
On Fri 2019-05-24 15:22:51, Hugh Dickins wrote: > On Wed, 22 May 2019, Sebastian Andrzej Siewior wrote: > > On 2019-05-22 12:21:13 [-0700], Andrew Morton wrote: > > > On Tue, 14 May 2019 17:29:55 +0300 Mike Rapoport > > > wrote: > > > > > > > When get_user_pages*() is called with pages = NULL, t

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-25 Thread Hugh Dickins
On Sat, 25 May 2019, Sebastian Andrzej Siewior wrote: > On 2019-05-24 15:22:51 [-0700], Hugh Dickins wrote: > > I've now run a couple of hours of load successfully with Mike's patch > > to GUP, no problem; but whatever the merits of that patch in general, > > I agree with Andrew that fault_in_pages

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-25 Thread Sebastian Andrzej Siewior
On 2019-05-24 15:22:51 [-0700], Hugh Dickins wrote: > I've now run a couple of hours of load successfully with Mike's patch > to GUP, no problem; but whatever the merits of that patch in general, > I agree with Andrew that fault_in_pages_writeable() seems altogether > more appropriate for copy_fpst

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-24 Thread Hugh Dickins
On Wed, 22 May 2019, Sebastian Andrzej Siewior wrote: > On 2019-05-22 12:21:13 [-0700], Andrew Morton wrote: > > On Tue, 14 May 2019 17:29:55 +0300 Mike Rapoport wrote: > > > > > When get_user_pages*() is called with pages = NULL, the processing of > > > VM_FAULT_RETRY terminates early without ac

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-22 Thread Andrew Morton
On Wed, 22 May 2019 23:38:29 +0300 Mike Rapoport wrote: > (added kvm) > > On Wed, May 22, 2019 at 12:21:13PM -0700, Andrew Morton wrote: > > On Tue, 14 May 2019 17:29:55 +0300 Mike Rapoport wrote: > > > > > When get_user_pages*() is called with pages = NULL, the processing of > > > VM_FAULT_RE

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-22 Thread Mike Rapoport
(added kvm) On Wed, May 22, 2019 at 12:21:13PM -0700, Andrew Morton wrote: > On Tue, 14 May 2019 17:29:55 +0300 Mike Rapoport wrote: > > > When get_user_pages*() is called with pages = NULL, the processing of > > VM_FAULT_RETRY terminates early without actually retrying to fault-in all > > the p

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-22 Thread Sebastian Andrzej Siewior
On 2019-05-22 12:21:13 [-0700], Andrew Morton wrote: > On Tue, 14 May 2019 17:29:55 +0300 Mike Rapoport wrote: > > > When get_user_pages*() is called with pages = NULL, the processing of > > VM_FAULT_RETRY terminates early without actually retrying to fault-in all > > the pages. > > > > If the p

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-22 Thread Andrew Morton
On Tue, 14 May 2019 17:29:55 +0300 Mike Rapoport wrote: > When get_user_pages*() is called with pages = NULL, the processing of > VM_FAULT_RETRY terminates early without actually retrying to fault-in all > the pages. > > If the pages in the requested range belong to a VMA that has userfaultfd >

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-21 Thread Mike Rapoport
Hi, Any comments on this? On Tue, May 14, 2019 at 05:29:55PM +0300, Mike Rapoport wrote: > When get_user_pages*() is called with pages = NULL, the processing of > VM_FAULT_RETRY terminates early without actually retrying to fault-in all > the pages. > > If the pages in the requested range belong

Re: [PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-16 Thread Andrei Vagin
On Tue, May 14, 2019 at 7:32 AM Mike Rapoport wrote: > > When get_user_pages*() is called with pages = NULL, the processing of > VM_FAULT_RETRY terminates early without actually retrying to fault-in all > the pages. > > If the pages in the requested range belong to a VMA that has userfaultfd > reg

[PATCH] mm/gup: continue VM_FAULT_RETRY processing event for pre-faults

2019-05-14 Thread Mike Rapoport
When get_user_pages*() is called with pages = NULL, the processing of VM_FAULT_RETRY terminates early without actually retrying to fault-in all the pages. If the pages in the requested range belong to a VMA that has userfaultfd registered, handle_userfault() returns VM_FAULT_RETRY *after* user spa