Re: [RFC v3 03/17] mm: Introduce pte_spinlock

2017-05-03 Thread Laurent Dufour
On 30/04/2017 06:47, Matthew Wilcox wrote: > On Thu, Apr 27, 2017 at 05:52:42PM +0200, Laurent Dufour wrote: >> +++ b/mm/memory.c >> @@ -2100,6 +2100,13 @@ static inline void wp_page_reuse(struct vm_fault *vmf) >> pte_unmap_unlock(vmf->pte, vmf->ptl); >> } >> >> +static bool

Re: [RFC v3 03/17] mm: Introduce pte_spinlock

2017-05-03 Thread Laurent Dufour
On 30/04/2017 06:47, Matthew Wilcox wrote: > On Thu, Apr 27, 2017 at 05:52:42PM +0200, Laurent Dufour wrote: >> +++ b/mm/memory.c >> @@ -2100,6 +2100,13 @@ static inline void wp_page_reuse(struct vm_fault *vmf) >> pte_unmap_unlock(vmf->pte, vmf->ptl); >> } >> >> +static bool

Re: [RFC v3 03/17] mm: Introduce pte_spinlock

2017-04-29 Thread Matthew Wilcox
On Thu, Apr 27, 2017 at 05:52:42PM +0200, Laurent Dufour wrote: > +++ b/mm/memory.c > @@ -2100,6 +2100,13 @@ static inline void wp_page_reuse(struct vm_fault *vmf) > pte_unmap_unlock(vmf->pte, vmf->ptl); > } > > +static bool pte_spinlock(struct vm_fault *vmf) > +{ > + vmf->ptl =

Re: [RFC v3 03/17] mm: Introduce pte_spinlock

2017-04-29 Thread Matthew Wilcox
On Thu, Apr 27, 2017 at 05:52:42PM +0200, Laurent Dufour wrote: > +++ b/mm/memory.c > @@ -2100,6 +2100,13 @@ static inline void wp_page_reuse(struct vm_fault *vmf) > pte_unmap_unlock(vmf->pte, vmf->ptl); > } > > +static bool pte_spinlock(struct vm_fault *vmf) > +{ > + vmf->ptl =

[RFC v3 03/17] mm: Introduce pte_spinlock

2017-04-27 Thread Laurent Dufour
This is needed because in handle_pte_fault() pte_offset_map() is called and then fe->ptl is fetched and spin_locked. This was previously embedded in the call to pte_offset_map_lock(). Signed-off-by: Laurent Dufour --- mm/memory.c | 15 +++ 1 file

[RFC v3 03/17] mm: Introduce pte_spinlock

2017-04-27 Thread Laurent Dufour
This is needed because in handle_pte_fault() pte_offset_map() is called and then fe->ptl is fetched and spin_locked. This was previously embedded in the call to pte_offset_map_lock(). Signed-off-by: Laurent Dufour --- mm/memory.c | 15 +++ 1 file changed, 11 insertions(+), 4