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

From: Peter Xu
Date: Wed Oct 09 2019 - 03:41:48 EST


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 pt_regs *regs)
> > fault = handle_mm_fault(vma, addr, flags);
> >
> > /*
> > - * If we need to retry but a fatal signal is pending, handle the
> > + * If we need to retry but a signal is pending, try to handle the
> > * signal first. We do not need to release the mmap_sem because it
> > * would already be released in __lock_page_or_retry in mm/filemap.c.
> > */
> > - if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(tsk))
> > + if ((fault & VM_FAULT_RETRY) &&
> > + fault_should_check_signal(user_mode(regs)))
> > return;
> >
> > if (unlikely(fault & VM_FAULT_ERROR)) {
>
> Acked-by: Palmer Dabbelt <palmer@xxxxxxxxxx> # RISC-V parts
>
> I'm assuming this is going in through some other tree.

Hi, Palmer,

Thanks for reviewing!

There's a new version here, please feel free to have a look too:

https://lore.kernel.org/lkml/20190926093904.5090-1-peterx@xxxxxxxxxx/

Regards,

--
Peter Xu