Re: [PATCH v4 05/10] mm: Return faster for non-fatal signals in user mode faults

2019-10-09 Thread Peter Xu
On Tue, Oct 08, 2019 at 03:43:19PM -0700, Palmer Dabbelt wrote: > > diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c > > index deeb820bd855..ea8f301de65b 100644 > > --- a/arch/riscv/mm/fault.c > > +++ b/arch/riscv/mm/fault.c > > @@ -111,11 +111,12 @@ asmlinkage void do_page_fault(struct

Re: [PATCH v4 05/10] mm: Return faster for non-fatal signals in user mode faults

2019-10-08 Thread Palmer Dabbelt
On Sun, 22 Sep 2019 21:25:18 PDT (-0700), pet...@redhat.com wrote: The idea comes from the upstream discussion between Linus and Andrea: https://lore.kernel.org/lkml/20171102193644.gb22...@redhat.com/ A summary to the issue: there was a special path in handle_userfault() in the past that

Re: [PATCH v4 05/10] mm: Return faster for non-fatal signals in user mode faults

2019-09-26 Thread Peter Xu
On Tue, Sep 24, 2019 at 08:45:18AM -0700, Matthew Wilcox wrote: [...] > Oh, and while you're looking at the callers of handle_mm_fault(), a > lot of them don't check conditions in the right order. x86, at least, > handles FAULT_RETRY before handling FAULT_ERROR, which is clearly wrong. > >

Re: [PATCH v4 05/10] mm: Return faster for non-fatal signals in user mode faults

2019-09-24 Thread Peter Xu
On Tue, Sep 24, 2019 at 08:45:18AM -0700, Matthew Wilcox wrote: > On Tue, Sep 24, 2019 at 11:19:08AM +0800, Peter Xu wrote: > > On Mon, Sep 23, 2019 at 07:54:47PM -0700, Matthew Wilcox wrote: > > > On Tue, Sep 24, 2019 at 10:47:21AM +0800, Peter Xu wrote: > > > > On Mon, Sep 23, 2019 at 11:03:49AM

Re: [PATCH v4 05/10] mm: Return faster for non-fatal signals in user mode faults

2019-09-24 Thread Matthew Wilcox
On Tue, Sep 24, 2019 at 11:19:08AM +0800, Peter Xu wrote: > On Mon, Sep 23, 2019 at 07:54:47PM -0700, Matthew Wilcox wrote: > > On Tue, Sep 24, 2019 at 10:47:21AM +0800, Peter Xu wrote: > > > On Mon, Sep 23, 2019 at 11:03:49AM -0700, Linus Torvalds wrote: > > > > On Sun, Sep 22, 2019 at 9:26 PM

Re: [PATCH v4 05/10] mm: Return faster for non-fatal signals in user mode faults

2019-09-23 Thread Peter Xu
On Mon, Sep 23, 2019 at 07:54:47PM -0700, Matthew Wilcox wrote: > On Tue, Sep 24, 2019 at 10:47:21AM +0800, Peter Xu wrote: > > On Mon, Sep 23, 2019 at 11:03:49AM -0700, Linus Torvalds wrote: > > > On Sun, Sep 22, 2019 at 9:26 PM Peter Xu wrote: > > > > > > > > This patch is a preparation of

Re: [PATCH v4 05/10] mm: Return faster for non-fatal signals in user mode faults

2019-09-23 Thread Matthew Wilcox
On Tue, Sep 24, 2019 at 10:47:21AM +0800, Peter Xu wrote: > On Mon, Sep 23, 2019 at 11:03:49AM -0700, Linus Torvalds wrote: > > On Sun, Sep 22, 2019 at 9:26 PM Peter Xu wrote: > > > > > > This patch is a preparation of removing that special path by allowing > > > the page fault to return even

Re: [PATCH v4 05/10] mm: Return faster for non-fatal signals in user mode faults

2019-09-23 Thread Peter Xu
On Mon, Sep 23, 2019 at 11:03:49AM -0700, Linus Torvalds wrote: > On Sun, Sep 22, 2019 at 9:26 PM Peter Xu wrote: > > > > This patch is a preparation of removing that special path by allowing > > the page fault to return even faster if we were interrupted by a > > non-fatal signal during a

Re: [PATCH v4 05/10] mm: Return faster for non-fatal signals in user mode faults

2019-09-23 Thread Linus Torvalds
On Sun, Sep 22, 2019 at 9:26 PM Peter Xu wrote: > > This patch is a preparation of removing that special path by allowing > the page fault to return even faster if we were interrupted by a > non-fatal signal during a user-mode page fault handling routine. So I really wish saome other vm person