Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-04-04 Thread Laurent Dufour
On 03/04/2018 21:10, Jerome Glisse wrote: > On Tue, Mar 13, 2018 at 06:59:36PM +0100, Laurent Dufour wrote: >> pte_unmap_same() is making the assumption that the page table are still >> around because the mmap_sem is held. >> This is no more the case when running a speculative page fault and >>

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-04-04 Thread Laurent Dufour
On 03/04/2018 21:10, Jerome Glisse wrote: > On Tue, Mar 13, 2018 at 06:59:36PM +0100, Laurent Dufour wrote: >> pte_unmap_same() is making the assumption that the page table are still >> around because the mmap_sem is held. >> This is no more the case when running a speculative page fault and >>

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-04-03 Thread Jerome Glisse
On Tue, Apr 03, 2018 at 01:40:18PM -0700, David Rientjes wrote: > On Tue, 3 Apr 2018, Jerome Glisse wrote: > > > > diff --git a/mm/memory.c b/mm/memory.c > > > index 21b1212a0892..4bc7b0bdcb40 100644 > > > --- a/mm/memory.c > > > +++ b/mm/memory.c > > > @@ -2309,21 +2309,29 @@ static bool

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-04-03 Thread Jerome Glisse
On Tue, Apr 03, 2018 at 01:40:18PM -0700, David Rientjes wrote: > On Tue, 3 Apr 2018, Jerome Glisse wrote: > > > > diff --git a/mm/memory.c b/mm/memory.c > > > index 21b1212a0892..4bc7b0bdcb40 100644 > > > --- a/mm/memory.c > > > +++ b/mm/memory.c > > > @@ -2309,21 +2309,29 @@ static bool

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-04-03 Thread David Rientjes
On Tue, 3 Apr 2018, Jerome Glisse wrote: > > diff --git a/mm/memory.c b/mm/memory.c > > index 21b1212a0892..4bc7b0bdcb40 100644 > > --- a/mm/memory.c > > +++ b/mm/memory.c > > @@ -2309,21 +2309,29 @@ static bool pte_map_lock(struct vm_fault *vmf) > > * parts, do_swap_page must check under lock

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-04-03 Thread David Rientjes
On Tue, 3 Apr 2018, Jerome Glisse wrote: > > diff --git a/mm/memory.c b/mm/memory.c > > index 21b1212a0892..4bc7b0bdcb40 100644 > > --- a/mm/memory.c > > +++ b/mm/memory.c > > @@ -2309,21 +2309,29 @@ static bool pte_map_lock(struct vm_fault *vmf) > > * parts, do_swap_page must check under lock

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-04-03 Thread Jerome Glisse
On Tue, Mar 13, 2018 at 06:59:36PM +0100, Laurent Dufour wrote: > pte_unmap_same() is making the assumption that the page table are still > around because the mmap_sem is held. > This is no more the case when running a speculative page fault and > additional check must be made to ensure that the

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-04-03 Thread Jerome Glisse
On Tue, Mar 13, 2018 at 06:59:36PM +0100, Laurent Dufour wrote: > pte_unmap_same() is making the assumption that the page table are still > around because the mmap_sem is held. > This is no more the case when running a speculative page fault and > additional check must be made to ensure that the

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-03-28 Thread Laurent Dufour
On 28/03/2018 12:20, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > @@ -2913,7 +2921,8 @@ int do_swap_page(struct vm_fault *vmf) int exclusive = 0; int ret = 0; >>> >>> Initialization is now unneeded. >> >> I'm sorry, what "initialization" are you

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-03-28 Thread Laurent Dufour
On 28/03/2018 12:20, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > @@ -2913,7 +2921,8 @@ int do_swap_page(struct vm_fault *vmf) int exclusive = 0; int ret = 0; >>> >>> Initialization is now unneeded. >> >> I'm sorry, what "initialization" are you

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-03-28 Thread David Rientjes
On Wed, 28 Mar 2018, Laurent Dufour wrote: > >> @@ -2913,7 +2921,8 @@ int do_swap_page(struct vm_fault *vmf) > >>int exclusive = 0; > >>int ret = 0; > > > > Initialization is now unneeded. > > I'm sorry, what "initialization" are you talking about here ? > The initialization of the

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-03-28 Thread David Rientjes
On Wed, 28 Mar 2018, Laurent Dufour wrote: > >> @@ -2913,7 +2921,8 @@ int do_swap_page(struct vm_fault *vmf) > >>int exclusive = 0; > >>int ret = 0; > > > > Initialization is now unneeded. > > I'm sorry, what "initialization" are you talking about here ? > The initialization of the

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-03-28 Thread Laurent Dufour
On 27/03/2018 23:18, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index 2f3e98edc94a..b6432a261e63 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >> @@ -1199,6 +1199,7 @@ static inline void

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-03-28 Thread Laurent Dufour
On 27/03/2018 23:18, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index 2f3e98edc94a..b6432a261e63 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >> @@ -1199,6 +1199,7 @@ static inline void

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-03-27 Thread David Rientjes
On Tue, 13 Mar 2018, Laurent Dufour wrote: > diff --git a/include/linux/mm.h b/include/linux/mm.h > index 2f3e98edc94a..b6432a261e63 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -1199,6 +1199,7 @@ static inline void clear_page_pfmemalloc(struct page > *page) > #define

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-03-27 Thread David Rientjes
On Tue, 13 Mar 2018, Laurent Dufour wrote: > diff --git a/include/linux/mm.h b/include/linux/mm.h > index 2f3e98edc94a..b6432a261e63 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -1199,6 +1199,7 @@ static inline void clear_page_pfmemalloc(struct page > *page) > #define

[PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-03-13 Thread Laurent Dufour
pte_unmap_same() is making the assumption that the page table are still around because the mmap_sem is held. This is no more the case when running a speculative page fault and additional check must be made to ensure that the final page table are still there. This is now done by calling

[PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-03-13 Thread Laurent Dufour
pte_unmap_same() is making the assumption that the page table are still around because the mmap_sem is held. This is no more the case when running a speculative page fault and additional check must be made to ensure that the final page table are still there. This is now done by calling