Re: [PATCH v4 19/20] x86/mm: Add speculative pagefault handling

2017-10-11 Thread Laurent Dufour
On 10/10/2017 23:23, Andrew Morton wrote: > On Mon, 9 Oct 2017 12:07:51 +0200 Laurent Dufour > wrote: > >> +/* >> + * Advertise that we call the Speculative Page Fault handler. >> + */ >> +#if defined(CONFIG_X86_64) && defined(CONFIG_SMP) >> +#define __HAVE_ARCH_CALL_SPF >> +#endif > > Here's

Re: [PATCH v4 19/20] x86/mm: Add speculative pagefault handling

2017-10-10 Thread Andrew Morton
On Mon, 9 Oct 2017 12:07:51 +0200 Laurent Dufour wrote: > +/* > + * Advertise that we call the Speculative Page Fault handler. > + */ > +#if defined(CONFIG_X86_64) && defined(CONFIG_SMP) > +#define __HAVE_ARCH_CALL_SPF > +#endif Here's where I mess up your life ;) It would be more idiomatic t

[PATCH v4 19/20] x86/mm: Add speculative pagefault handling

2017-10-09 Thread Laurent Dufour
From: Peter Zijlstra Try a speculative fault before acquiring mmap_sem, if it returns with VM_FAULT_RETRY continue with the mmap_sem acquisition and do the traditional fault. Signed-off-by: Peter Zijlstra (Intel) [Clearing of FAULT_FLAG_ALLOW_RETRY is now done in handle_speculative_fault()] [