Re: [RFC PATCH 11/37] x86/mm: attempt speculative mm faults first

2021-04-07 Thread Michel Lespinasse
On Wed, Apr 07, 2021 at 04:35:28PM +0100, Matthew Wilcox wrote: > On Wed, Apr 07, 2021 at 04:48:44PM +0200, Peter Zijlstra wrote: > > On Tue, Apr 06, 2021 at 06:44:36PM -0700, Michel Lespinasse wrote: > > > --- a/arch/x86/mm/fault.c > > > +++ b/arch/x86/mm/fault.c > > > @@ -1219,6 +1219,8 @@ void d

Re: [RFC PATCH 11/37] x86/mm: attempt speculative mm faults first

2021-04-07 Thread Michel Lespinasse
On Wed, Apr 07, 2021 at 01:14:53PM -0700, Michel Lespinasse wrote: > On Wed, Apr 07, 2021 at 04:48:44PM +0200, Peter Zijlstra wrote: > > On Tue, Apr 06, 2021 at 06:44:36PM -0700, Michel Lespinasse wrote: > > > --- a/arch/x86/mm/fault.c > > > +++ b/arch/x86/mm/fault.c > > > @@ -1219,6 +1219,8 @@ voi

Re: [RFC PATCH 11/37] x86/mm: attempt speculative mm faults first

2021-04-07 Thread Michel Lespinasse
On Wed, Apr 07, 2021 at 04:48:44PM +0200, Peter Zijlstra wrote: > On Tue, Apr 06, 2021 at 06:44:36PM -0700, Michel Lespinasse wrote: > > --- a/arch/x86/mm/fault.c > > +++ b/arch/x86/mm/fault.c > > @@ -1219,6 +1219,8 @@ void do_user_addr_fault(struct pt_regs *regs, > > struct mm_struct *mm; > >

Re: [RFC PATCH 11/37] x86/mm: attempt speculative mm faults first

2021-04-07 Thread Matthew Wilcox
On Wed, Apr 07, 2021 at 04:48:44PM +0200, Peter Zijlstra wrote: > On Tue, Apr 06, 2021 at 06:44:36PM -0700, Michel Lespinasse wrote: > > --- a/arch/x86/mm/fault.c > > +++ b/arch/x86/mm/fault.c > > @@ -1219,6 +1219,8 @@ void do_user_addr_fault(struct pt_regs *regs, > > struct mm_struct *mm; > >

Re: [RFC PATCH 11/37] x86/mm: attempt speculative mm faults first

2021-04-07 Thread Peter Zijlstra
On Tue, Apr 06, 2021 at 06:44:36PM -0700, Michel Lespinasse wrote: > --- a/arch/x86/mm/fault.c > +++ b/arch/x86/mm/fault.c > @@ -1219,6 +1219,8 @@ void do_user_addr_fault(struct pt_regs *regs, > struct mm_struct *mm; > vm_fault_t fault; > unsigned int flags = FAULT_FLAG_DEFAULT; >

[RFC PATCH 11/37] x86/mm: attempt speculative mm faults first

2021-04-06 Thread Michel Lespinasse
Attempt speculative mm fault handling first, and fall back to the existing (non-speculative) code if that fails. The speculative handling closely mirrors the non-speculative logic. This includes some x86 specific bits such as the access_error() call. This is why we chose to implement the speculati