[PATCH v10 02/25] x86/mm: define ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2018-04-17 Thread Laurent Dufour
Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT which turns on the Speculative Page Fault handler when building for 64bit. Cc: Thomas Gleixner Signed-off-by: Laurent Dufour --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index d8983df5a2bc

Re: [PATCH v9 00/24] Speculative page faults

2018-04-13 Thread Laurent Dufour
On 14/03/2018 14:11, Michal Hocko wrote: > On Tue 13-03-18 18:59:30, Laurent Dufour wrote: >> Changes since v8: >> - Don't check PMD when locking the pte when THP is disabled >>Thanks to Daniel Jordan for reporting this. >> - Rebase on 4.16 > > Is this real

Re: [PATCH v9 00/24] Speculative page faults

2018-04-13 Thread Laurent Dufour
On 14/03/2018 14:11, Michal Hocko wrote: > On Tue 13-03-18 18:59:30, Laurent Dufour wrote: >> Changes since v8: >> - Don't check PMD when locking the pte when THP is disabled >>Thanks to Daniel Jordan for reporting this. >> - Rebase on 4.16 > > Is this real

Re: [PATCH v9 21/24] perf tools: Add support for the SPF perf event

2018-04-12 Thread Laurent Dufour
On 10/04/2018 08:47, David Rientjes wrote: > On Mon, 26 Mar 2018, Andi Kleen wrote: > >>> Aside: should there be a new spec_flt field for struct task_struct that >>> complements maj_flt and min_flt and be exported through /proc/pid/stat? >> >> No. task_struct is already too bloated. If you need

Re: [PATCH v9 21/24] perf tools: Add support for the SPF perf event

2018-04-12 Thread Laurent Dufour
On 10/04/2018 08:47, David Rientjes wrote: > On Mon, 26 Mar 2018, Andi Kleen wrote: > >>> Aside: should there be a new spec_flt field for struct task_struct that >>> complements maj_flt and min_flt and be exported through /proc/pid/stat? >> >> No. task_struct is already too bloated. If you need

[PATCH v4] mm: remove odd HAVE_PTE_SPECIAL

2018-04-12 Thread Laurent Dufour
Remove the additional define HAVE_PTE_SPECIAL and rely directly on CONFIG_ARCH_HAS_PTE_SPECIAL. There is no functional change introduced by this patch Signed-off-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> --- mm/memory.c | 15 ++- 1 file changed, 6 insertions(+), 9 del

[PATCH v4] mm: remove odd HAVE_PTE_SPECIAL

2018-04-12 Thread Laurent Dufour
Remove the additional define HAVE_PTE_SPECIAL and rely directly on CONFIG_ARCH_HAS_PTE_SPECIAL. There is no functional change introduced by this patch Signed-off-by: Laurent Dufour --- mm/memory.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mm/memory.c b

Re: [PATCH v3 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-11 Thread Laurent Dufour
On 11/04/2018 11:09, Christophe LEROY wrote: > > > Le 11/04/2018 à 11:03, Laurent Dufour a écrit : >> >> >> On 11/04/2018 10:58, Christophe LEROY wrote: >>> >>> >>> Le 11/04/2018 à 10:03, Laurent Dufour a écrit : >>>&g

Re: [PATCH v3 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-11 Thread Laurent Dufour
On 11/04/2018 11:09, Christophe LEROY wrote: > > > Le 11/04/2018 à 11:03, Laurent Dufour a écrit : >> >> >> On 11/04/2018 10:58, Christophe LEROY wrote: >>> >>> >>> Le 11/04/2018 à 10:03, Laurent Dufour a écrit : >>>&g

Re: [PATCH v3 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-11 Thread Laurent Dufour
On 11/04/2018 10:58, Christophe LEROY wrote: > > > Le 11/04/2018 à 10:03, Laurent Dufour a écrit : >> Remove the additional define HAVE_PTE_SPECIAL and rely directly on >> CONFIG_ARCH_HAS_PTE_SPECIAL. >> >> There is no functional change introduced by this p

Re: [PATCH v3 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-11 Thread Laurent Dufour
On 11/04/2018 10:58, Christophe LEROY wrote: > > > Le 11/04/2018 à 10:03, Laurent Dufour a écrit : >> Remove the additional define HAVE_PTE_SPECIAL and rely directly on >> CONFIG_ARCH_HAS_PTE_SPECIAL. >> >> There is no functional change introduced by this p

Re: [PATCH v3 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-11 Thread Laurent Dufour
On 11/04/2018 10:33, Michal Hocko wrote: > On Wed 11-04-18 10:03:36, Laurent Dufour wrote: >> @@ -881,7 +876,8 @@ struct page *_vm_normal_page(struct vm_area_struct *vma, >> unsigned long addr, >> >> if (is_zero_pfn(pfn)) >> return NULL;

Re: [PATCH v3 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-11 Thread Laurent Dufour
On 11/04/2018 10:33, Michal Hocko wrote: > On Wed 11-04-18 10:03:36, Laurent Dufour wrote: >> @@ -881,7 +876,8 @@ struct page *_vm_normal_page(struct vm_area_struct *vma, >> unsigned long addr, >> >> if (is_zero_pfn(pfn)) >> return NULL;

[PATCH v3 1/2] mm: introduce ARCH_HAS_PTE_SPECIAL

2018-04-11 Thread Laurent Dufour
_PTE_SPECIAL if SPARC64 There is no functional change introduced by this patch. Suggested-by: Jerome Glisse <jglisse@redhat> Reviewed-by: Jerome Glisse <jglisse@redhat> Acked-by: David Rientjes <rient...@google.com> Signed-off-by: Laurent Dufour <lduf...@linux.vnet.ibm.co

[PATCH v3 1/2] mm: introduce ARCH_HAS_PTE_SPECIAL

2018-04-11 Thread Laurent Dufour
_PTE_SPECIAL if SPARC64 There is no functional change introduced by this patch. Suggested-by: Jerome Glisse Reviewed-by: Jerome Glisse Acked-by: David Rientjes Signed-off-by: Laurent Dufour --- Documentation/features/vm/pte_special/arch-support.txt | 2 +- arch

[PATCH v3 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-11 Thread Laurent Dufour
Remove the additional define HAVE_PTE_SPECIAL and rely directly on CONFIG_ARCH_HAS_PTE_SPECIAL. There is no functional change introduced by this patch Signed-off-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> --- mm/memory.c | 19 --- 1 file changed, 8 insertions(

[PATCH v3 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-11 Thread Laurent Dufour
Remove the additional define HAVE_PTE_SPECIAL and rely directly on CONFIG_ARCH_HAS_PTE_SPECIAL. There is no functional change introduced by this patch Signed-off-by: Laurent Dufour --- mm/memory.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/mm

[PATCH v3 0/2] move __HAVE_ARCH_PTE_SPECIAL in Kconfig

2018-04-11 Thread Laurent Dufour
__HAVE_ARCH_PTE_SPECIAL in arch/riscv/include/asm/pgtable-bits.h * use IS_ENABLED() instead of #ifdef blocks in patch 2 Laurent Dufour (2): mm: introduce ARCH_HAS_PTE_SPECIAL mm: remove odd HAVE_PTE_SPECIAL .../features/vm/pte_special/arch-support.txt | 2 +- arch/arc/Kconfig

[PATCH v3 0/2] move __HAVE_ARCH_PTE_SPECIAL in Kconfig

2018-04-11 Thread Laurent Dufour
__HAVE_ARCH_PTE_SPECIAL in arch/riscv/include/asm/pgtable-bits.h * use IS_ENABLED() instead of #ifdef blocks in patch 2 Laurent Dufour (2): mm: introduce ARCH_HAS_PTE_SPECIAL mm: remove odd HAVE_PTE_SPECIAL .../features/vm/pte_special/arch-support.txt | 2 +- arch/arc/Kconfig

Re: [PATCH v2 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-10 Thread Laurent Dufour
On 10/04/2018 17:58, Robin Murphy wrote: > On 10/04/18 16:25, Laurent Dufour wrote: >> Remove the additional define HAVE_PTE_SPECIAL and rely directly on >> CONFIG_ARCH_HAS_PTE_SPECIAL. >> >> There is no functional change introduced by this patch >> >&

Re: [PATCH v2 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-10 Thread Laurent Dufour
On 10/04/2018 17:58, Robin Murphy wrote: > On 10/04/18 16:25, Laurent Dufour wrote: >> Remove the additional define HAVE_PTE_SPECIAL and rely directly on >> CONFIG_ARCH_HAS_PTE_SPECIAL. >> >> There is no functional change introduced by this patch >>

Re: [PATCH v2 1/2] mm: introduce ARCH_HAS_PTE_SPECIAL

2018-04-10 Thread Laurent Dufour
On 10/04/2018 18:09, Matthew Wilcox wrote: > On Tue, Apr 10, 2018 at 05:25:50PM +0200, Laurent Dufour wrote: >> arch/powerpc/include/asm/pte-common.h | 3 --- >> arch/riscv/Kconfig | 1 + >&g

Re: [PATCH v2 1/2] mm: introduce ARCH_HAS_PTE_SPECIAL

2018-04-10 Thread Laurent Dufour
On 10/04/2018 18:09, Matthew Wilcox wrote: > On Tue, Apr 10, 2018 at 05:25:50PM +0200, Laurent Dufour wrote: >> arch/powerpc/include/asm/pte-common.h | 3 --- >> arch/riscv/Kconfig | 1 + >&g

Re: [PATCH v9 16/24] mm: Introduce __page_add_new_anon_rmap()

2018-04-10 Thread Laurent Dufour
On 03/04/2018 01:57, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> When dealing with speculative page fault handler, we may race with VMA >> being split or merged. In this case the vma->vm_start and vm->vm_end >> fields may not ma

Re: [PATCH v9 16/24] mm: Introduce __page_add_new_anon_rmap()

2018-04-10 Thread Laurent Dufour
On 03/04/2018 01:57, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> When dealing with speculative page fault handler, we may race with VMA >> being split or merged. In this case the vma->vm_start and vm->vm_end >> fields may not ma

Re: [PATCH v9 17/24] mm: Protect mm_rb tree with a rwlock

2018-04-10 Thread Laurent Dufour
On 03/04/2018 02:11, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> This change is inspired by the Peter's proposal patch [1] which was >> protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in >> that particular case, and

Re: [PATCH v9 17/24] mm: Protect mm_rb tree with a rwlock

2018-04-10 Thread Laurent Dufour
On 03/04/2018 02:11, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> This change is inspired by the Peter's proposal patch [1] which was >> protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in >> that particular case, and

[PATCH v2 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-10 Thread Laurent Dufour
Remove the additional define HAVE_PTE_SPECIAL and rely directly on CONFIG_ARCH_HAS_PTE_SPECIAL. There is no functional change introduced by this patch Signed-off-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> --- mm/memory.c | 23 ++- 1 file changed, 10 insertions(

[PATCH v2 2/2] mm: remove odd HAVE_PTE_SPECIAL

2018-04-10 Thread Laurent Dufour
Remove the additional define HAVE_PTE_SPECIAL and rely directly on CONFIG_ARCH_HAS_PTE_SPECIAL. There is no functional change introduced by this patch Signed-off-by: Laurent Dufour --- mm/memory.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/mm

[PATCH v2 1/2] mm: introduce ARCH_HAS_PTE_SPECIAL

2018-04-10 Thread Laurent Dufour
_PTE_SPECIAL if SPARC64 There is no functional change introduced by this patch. Suggested-by: Jerome Glisse <jglisse@redhat> Reviewed-by: Jerome Glisse <jglisse@redhat> Signed-off-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> --- Documentation/features/vm/pte_special/arch-suppor

[PATCH v2 1/2] mm: introduce ARCH_HAS_PTE_SPECIAL

2018-04-10 Thread Laurent Dufour
_PTE_SPECIAL if SPARC64 There is no functional change introduced by this patch. Suggested-by: Jerome Glisse Reviewed-by: Jerome Glisse Signed-off-by: Laurent Dufour --- Documentation/features/vm/pte_special/arch-support.txt | 2 +- arch/arc/Kconfig | 1 + arch

[PATCH v2 0/2] move __HAVE_ARCH_PTE_SPECIAL in Kconfig

2018-04-10 Thread Laurent Dufour
files, setting it automatically when architectures was already setting it in header file. The second patch is removing the odd define HAVE_PTE_SPECIAL which is a duplicate of CONFIG_ARCH_HAS_PTE_SPECIAL. There is no functional change introduced by this series. Laurent Dufour (2): mm: introduce

[PATCH v2 0/2] move __HAVE_ARCH_PTE_SPECIAL in Kconfig

2018-04-10 Thread Laurent Dufour
files, setting it automatically when architectures was already setting it in header file. The second patch is removing the odd define HAVE_PTE_SPECIAL which is a duplicate of CONFIG_ARCH_HAS_PTE_SPECIAL. There is no functional change introduced by this series. Laurent Dufour (2): mm: introduce

Re: [PATCH 2/3] mm: replace __HAVE_ARCH_PTE_SPECIAL

2018-04-10 Thread Laurent Dufour
On 09/04/2018 22:08, David Rientjes wrote: > On Mon, 9 Apr 2018, Christoph Hellwig wrote: > >>> -#ifdef __HAVE_ARCH_PTE_SPECIAL >>> +#ifdef CONFIG_ARCH_HAS_PTE_SPECIAL >>> # define HAVE_PTE_SPECIAL 1 >>> #else >>> # define HAVE_PTE_SPECIAL 0 >> >> I'd say kill this odd indirection and just use

Re: [PATCH 2/3] mm: replace __HAVE_ARCH_PTE_SPECIAL

2018-04-10 Thread Laurent Dufour
On 09/04/2018 22:08, David Rientjes wrote: > On Mon, 9 Apr 2018, Christoph Hellwig wrote: > >>> -#ifdef __HAVE_ARCH_PTE_SPECIAL >>> +#ifdef CONFIG_ARCH_HAS_PTE_SPECIAL >>> # define HAVE_PTE_SPECIAL 1 >>> #else >>> # define HAVE_PTE_SPECIAL 0 >> >> I'd say kill this odd indirection and just use

Re: [PATCH 0/3] move __HAVE_ARCH_PTE_SPECIAL in Kconfig

2018-04-09 Thread Laurent Dufour
On 09/04/2018 18:03, Vineet Gupta wrote: > On 04/09/2018 06:57 AM, Laurent Dufour wrote: >> The per architecture __HAVE_ARCH_PTE_SPECIAL is defined statically in the >> per architecture header files. This doesn't allow to make other >> configuration dependent on it.

Re: [PATCH 0/3] move __HAVE_ARCH_PTE_SPECIAL in Kconfig

2018-04-09 Thread Laurent Dufour
On 09/04/2018 18:03, Vineet Gupta wrote: > On 04/09/2018 06:57 AM, Laurent Dufour wrote: >> The per architecture __HAVE_ARCH_PTE_SPECIAL is defined statically in the >> per architecture header files. This doesn't allow to make other >> configuration dependent on it.

[PATCH 3/3] mm: remove __HAVE_ARCH_PTE_SPECIAL

2018-04-09 Thread Laurent Dufour
It is now replaced by Kconfig variable CONFIG_ARCH_HAS_PTE_SPECIAL. Signed-off-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> --- arch/arc/include/asm/pgtable.h | 2 -- arch/arm/include/asm/pgtable-3level.h| 1 - arch/arm64/include/asm/pgtable.h | 2 --

[PATCH 2/3] mm: replace __HAVE_ARCH_PTE_SPECIAL

2018-04-09 Thread Laurent Dufour
Replace __HAVE_ARCH_PTE_SPECIAL by the new configuration variable CONFIG_ARCH_HAS_PTE_SPECIAL. Signed-off-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> --- Documentation/features/vm/pte_special/arch-support.txt | 2 +- include/linux/pfn_t.h | 4 ++-- mm

[PATCH 3/3] mm: remove __HAVE_ARCH_PTE_SPECIAL

2018-04-09 Thread Laurent Dufour
It is now replaced by Kconfig variable CONFIG_ARCH_HAS_PTE_SPECIAL. Signed-off-by: Laurent Dufour --- arch/arc/include/asm/pgtable.h | 2 -- arch/arm/include/asm/pgtable-3level.h| 1 - arch/arm64/include/asm/pgtable.h | 2 -- arch/powerpc/include/asm/book3s/64

[PATCH 2/3] mm: replace __HAVE_ARCH_PTE_SPECIAL

2018-04-09 Thread Laurent Dufour
Replace __HAVE_ARCH_PTE_SPECIAL by the new configuration variable CONFIG_ARCH_HAS_PTE_SPECIAL. Signed-off-by: Laurent Dufour --- Documentation/features/vm/pte_special/arch-support.txt | 2 +- include/linux/pfn_t.h | 4 ++-- mm/gup.c

[PATCH 1/3] mm: introduce ARCH_HAS_PTE_SPECIAL

2018-04-09 Thread Laurent Dufour
_PTE_SPECIAL if SPARC64 Suggested-by: Jerome Glisse <jgli...@redhat.com> Signed-off-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> --- arch/arc/Kconfig | 1 + arch/arm/Kconfig | 1 + arch/arm64/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/riscv/Kconfig | 1 + arch/s390/K

[PATCH 1/3] mm: introduce ARCH_HAS_PTE_SPECIAL

2018-04-09 Thread Laurent Dufour
_PTE_SPECIAL if SPARC64 Suggested-by: Jerome Glisse Signed-off-by: Laurent Dufour --- arch/arc/Kconfig | 1 + arch/arm/Kconfig | 1 + arch/arm64/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/riscv/Kconfig | 1 + arch/s390/Kconfig| 1 + arch/sh/Kconfig | 1 + arch/sparc/Kconfig

[PATCH 0/3] move __HAVE_ARCH_PTE_SPECIAL in Kconfig

2018-04-09 Thread Laurent Dufour
was already setting it in header file. There is no functional change introduced by this series. Laurent Dufour (3): mm: introduce ARCH_HAS_PTE_SPECIAL mm: replace __HAVE_ARCH_PTE_SPECIAL mm: remove __HAVE_ARCH_PTE_SPECIAL Documentation/features/vm/pte_special/arch-support.txt | 2 +- arch/arc

[PATCH 0/3] move __HAVE_ARCH_PTE_SPECIAL in Kconfig

2018-04-09 Thread Laurent Dufour
was already setting it in header file. There is no functional change introduced by this series. Laurent Dufour (3): mm: introduce ARCH_HAS_PTE_SPECIAL mm: replace __HAVE_ARCH_PTE_SPECIAL mm: remove __HAVE_ARCH_PTE_SPECIAL Documentation/features/vm/pte_special/arch-support.txt | 2 +- arch/arc

Re: [PATCH v9 17/24] mm: Protect mm_rb tree with a rwlock

2018-04-06 Thread Laurent Dufour
On 03/04/2018 02:11, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> This change is inspired by the Peter's proposal patch [1] which was >> protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in >> that particular case, and

Re: [PATCH v9 17/24] mm: Protect mm_rb tree with a rwlock

2018-04-06 Thread Laurent Dufour
On 03/04/2018 02:11, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> This change is inspired by the Peter's proposal patch [1] which was >> protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in >> that particular case, and

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-04-05 Thread Laurent Dufour
On 04/04/2018 23:53, David Rientjes wrote: > On Wed, 4 Apr 2018, Laurent Dufour wrote: > >>> I also think the following is needed: >>> >>> diff --git a/fs/exec.c b/fs/exec.c >>> --- a/fs/exec.c >>> +++ b/fs/exec.c >>> @@ -312,6 +3

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-04-05 Thread Laurent Dufour
On 04/04/2018 23:53, David Rientjes wrote: > On Wed, 4 Apr 2018, Laurent Dufour wrote: > >>> I also think the following is needed: >>> >>> diff --git a/fs/exec.c b/fs/exec.c >>> --- a/fs/exec.c >>> +++ b/fs/exec.c >>> @@ -312,6 +3

Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page()

2018-04-05 Thread Laurent Dufour
On 04/04/2018 23:59, Jerome Glisse wrote: > On Wed, Apr 04, 2018 at 06:26:44PM +0200, Laurent Dufour wrote: >> >> >> On 03/04/2018 21:39, Jerome Glisse wrote: >>> On Tue, Mar 13, 2018 at 06:59:45PM +0100, Laurent Dufour wrote: >>>> When dealing wit

Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page()

2018-04-05 Thread Laurent Dufour
On 04/04/2018 23:59, Jerome Glisse wrote: > On Wed, Apr 04, 2018 at 06:26:44PM +0200, Laurent Dufour wrote: >> >> >> On 03/04/2018 21:39, Jerome Glisse wrote: >>> On Tue, Mar 13, 2018 at 06:59:45PM +0100, Laurent Dufour wrote: >>>> When dealing wit

Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page()

2018-04-04 Thread Laurent Dufour
On 03/04/2018 21:39, Jerome Glisse wrote: > On Tue, Mar 13, 2018 at 06:59:45PM +0100, Laurent Dufour wrote: >> When dealing with the speculative fault path we should use the VMA's field >> cached value stored in the vm_fault structure. >> >> Currently vm_normal_

Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page()

2018-04-04 Thread Laurent Dufour
On 03/04/2018 21:39, Jerome Glisse wrote: > On Tue, Mar 13, 2018 at 06:59:45PM +0100, Laurent Dufour wrote: >> When dealing with the speculative fault path we should use the VMA's field >> cached value stored in the vm_fault structure. >> >> Currently vm_normal_

Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page()

2018-04-04 Thread Laurent Dufour
On 03/04/2018 01: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 a84ddc218bbd..73b8b99f482b 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >> @@ -1

Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page()

2018-04-04 Thread Laurent Dufour
On 03/04/2018 01: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 a84ddc218bbd..73b8b99f482b 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >> @@ -1

Re: [PATCH v9 14/24] mm: Introduce __maybe_mkwrite()

2018-04-04 Thread Laurent Dufour
On 03/04/2018 01:12, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index dfa81a638b7c..a84ddc218bbd 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >> @@ -684,1

Re: [PATCH v9 14/24] mm: Introduce __maybe_mkwrite()

2018-04-04 Thread Laurent Dufour
On 03/04/2018 01:12, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index dfa81a638b7c..a84ddc218bbd 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >> @@ -684,1

Re: [PATCH v9 11/24] mm: Cache some VMA fields in the vm_fault structure

2018-04-04 Thread Laurent Dufour
On 03/04/2018 00:24, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index ef6ef0627090..dfa81a638b7c 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >>

Re: [PATCH v9 11/24] mm: Cache some VMA fields in the vm_fault structure

2018-04-04 Thread Laurent Dufour
On 03/04/2018 00:24, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index ef6ef0627090..dfa81a638b7c 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >>

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-04-04 Thread Laurent Dufour
On 04/04/2018 03:03, David Rientjes wrote: > On Tue, 3 Apr 2018, David Rientjes wrote: > > I found the root cause of this lockdep warning. > > In mmap_region(), unmap_region() may be called while vma_link() has not > been > called. This happens during the error path if

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-04-04 Thread Laurent Dufour
On 04/04/2018 03:03, David Rientjes wrote: > On Tue, 3 Apr 2018, David Rientjes wrote: > > I found the root cause of this lockdep warning. > > In mmap_region(), unmap_region() may be called while vma_link() has not > been > called. This happens during the error path if

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-04-04 Thread Laurent Dufour
On 04/04/2018 02:48, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > >> On 26/03/2018 00:10, David Rientjes wrote: >>> On Wed, 21 Mar 2018, Laurent Dufour wrote: >>> >>>> I found the root cause of this lockdep warning. >

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-04-04 Thread Laurent Dufour
On 04/04/2018 02:48, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > >> On 26/03/2018 00:10, David Rientjes wrote: >>> On Wed, 21 Mar 2018, Laurent Dufour wrote: >>> >>>> I found the root cause of this lockdep warning. >

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 s

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 s

Re: [PATCH v9 04/24] mm: Prepare for FAULT_FLAG_SPECULATIVE

2018-04-04 Thread Laurent Dufour
On 03/04/2018 23:57, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > >>>> diff --git a/include/linux/mm.h b/include/linux/mm.h >>>> index 4d02524a7998..2f3e98edc94a 100644 >>>> --- a/include/linux/mm.h >>>> +++ b/inclu

Re: [PATCH v9 04/24] mm: Prepare for FAULT_FLAG_SPECULATIVE

2018-04-04 Thread Laurent Dufour
On 03/04/2018 23:57, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > >>>> diff --git a/include/linux/mm.h b/include/linux/mm.h >>>> index 4d02524a7998..2f3e98edc94a 100644 >>>> --- a/include/linux/mm.h >>>> +++ b/inclu

Re: [PATCH v9 09/24] mm: protect mremap() against SPF hanlder

2018-04-04 Thread Laurent Dufour
On 28/03/2018 23:21, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > >>>> @@ -326,7 +336,10 @@ static unsigned long move_vma(struct vm_area_struct >>>> *vma, >>>>mremap_userfaultfd_prep(new_vma, uf); >>>>

Re: [PATCH v9 09/24] mm: protect mremap() against SPF hanlder

2018-04-04 Thread Laurent Dufour
On 28/03/2018 23:21, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > >>>> @@ -326,7 +336,10 @@ static unsigned long move_vma(struct vm_area_struct >>>> *vma, >>>>mremap_userfaultfd_prep(new_vma, uf); >>>>

Re: [PATCH v9 00/24] Speculative page faults

2018-04-04 Thread Laurent Dufour
Hi Jerome, Thanks for reviewing this series. On 03/04/2018 22:37, Jerome Glisse wrote: > On Tue, Mar 13, 2018 at 06:59:30PM +0100, Laurent Dufour wrote: >> This is a port on kernel 4.16 of the work done by Peter Zijlstra to >> handle page fault without holding the

Re: [PATCH v9 00/24] Speculative page faults

2018-04-04 Thread Laurent Dufour
Hi Jerome, Thanks for reviewing this series. On 03/04/2018 22:37, Jerome Glisse wrote: > On Tue, Mar 13, 2018 at 06:59:30PM +0100, Laurent Dufour wrote: >> This is a port on kernel 4.16 of the work done by Peter Zijlstra to >> handle page fault without holding the

Re: [PATCH v9 00/24] Speculative page faults

2018-03-29 Thread Laurent Dufour
On 22/03/2018 02:21, Ganesh Mahendran wrote: > Hi, Laurent > > 2018-03-14 1:59 GMT+08:00 Laurent Dufour <lduf...@linux.vnet.ibm.com>: >> This is a port on kernel 4.16 of the work done by Peter Zijlstra to >> handle page fault without holding the mm semaphore [1

Re: [PATCH v9 00/24] Speculative page faults

2018-03-29 Thread Laurent Dufour
On 22/03/2018 02:21, Ganesh Mahendran wrote: > Hi, Laurent > > 2018-03-14 1:59 GMT+08:00 Laurent Dufour : >> This is a port on kernel 4.16 of the work done by Peter Zijlstra to >> handle page fault without holding the mm semaphore [1]. >> >> The idea is to try

Re: [PATCH v8 22/24] mm: Speculative page fault handler return VMA

2018-03-29 Thread Laurent Dufour
On 29/03/2018 05:06, Ganesh Mahendran wrote: > 2018-03-29 10:26 GMT+08:00 Ganesh Mahendran <opensource.gan...@gmail.com>: >> Hi, Laurent >> >> 2018-02-16 23:25 GMT+08:00 Laurent Dufour <lduf...@linux.vnet.ibm.com>: >>> When the speculativ

Re: [PATCH v8 22/24] mm: Speculative page fault handler return VMA

2018-03-29 Thread Laurent Dufour
On 29/03/2018 05:06, Ganesh Mahendran wrote: > 2018-03-29 10:26 GMT+08:00 Ganesh Mahendran : >> Hi, Laurent >> >> 2018-02-16 23:25 GMT+08:00 Laurent Dufour : >>> When the speculative page fault handler is returning VM_RETRY, there is a >>> chance that VMA fe

Re: [PATCH v9 09/24] mm: protect mremap() against SPF hanlder

2018-03-28 Thread Laurent Dufour
On 28/03/2018 00:12, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index 88042d843668..ef6ef0627090 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h &

Re: [PATCH v9 09/24] mm: protect mremap() against SPF hanlder

2018-03-28 Thread Laurent Dufour
On 28/03/2018 00:12, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index 88042d843668..ef6ef0627090 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h &

Re: [PATCH v9 07/24] mm: VMA sequence count

2018-03-28 Thread Laurent Dufour
On 27/03/2018 23:30, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/mm/mmap.c b/mm/mmap.c >> index faf85699f1a1..5898255d0aeb 100644 >> --- a/mm/mmap.c >> +++ b/mm/mmap.c >> @@ -558,6 +558,10 @@ void __vma_

Re: [PATCH v9 07/24] mm: VMA sequence count

2018-03-28 Thread Laurent Dufour
On 27/03/2018 23:30, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/mm/mmap.c b/mm/mmap.c >> index faf85699f1a1..5898255d0aeb 100644 >> --- a/mm/mmap.c >> +++ b/mm/mmap.c >> @@ -558,6 +558,10 @@ void __vma_

Re: [PATCH v9 08/24] mm: Protect VMA modifications using VMA sequence count

2018-03-28 Thread Laurent Dufour
On 27/03/2018 23:57, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/mm/mmap.c b/mm/mmap.c >> index 5898255d0aeb..d6533cb85213 100644 >> --- a/mm/mmap.c >> +++ b/mm/mmap.c >> @@ -847,17 +847,18 @@ int __vma_adjust(

Re: [PATCH v9 08/24] mm: Protect VMA modifications using VMA sequence count

2018-03-28 Thread Laurent Dufour
On 27/03/2018 23:57, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/mm/mmap.c b/mm/mmap.c >> index 5898255d0aeb..d6533cb85213 100644 >> --- a/mm/mmap.c >> +++ b/mm/mmap.c >> @@ -847,17 +847,18 @@ int __vma_adjust(

Re: [PATCH v9 08/24] mm: Protect VMA modifications using VMA sequence count

2018-03-28 Thread Laurent Dufour
On 27/03/2018 23:45, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c >> index 65ae54659833..a2d9c87b7b0b 100644 >> --- a/fs/proc/task_mmu.c >> +++ b/fs/proc/task_mmu.c >> @

Re: [PATCH v9 08/24] mm: Protect VMA modifications using VMA sequence count

2018-03-28 Thread Laurent Dufour
On 27/03/2018 23:45, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c >> index 65ae54659833..a2d9c87b7b0b 100644 >> --- a/fs/proc/task_mmu.c >> +++ b/fs/proc/task_mmu.c >> @

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-03-28 Thread Laurent Dufour
On 26/03/2018 00:10, David Rientjes wrote: > On Wed, 21 Mar 2018, Laurent Dufour wrote: > >> I found the root cause of this lockdep warning. >> >> In mmap_region(), unmap_region() may be called while vma_link() has not been >> called. This happens during the er

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-03-28 Thread Laurent Dufour
On 26/03/2018 00:10, David Rientjes wrote: > On Wed, 21 Mar 2018, Laurent Dufour wrote: > >> I found the root cause of this lockdep warning. >> >> In mmap_region(), unmap_region() may be called while vma_link() has not been >> called. This happens during the er

Re: [PATCH v9 01/24] mm: Introduce CONFIG_SPECULATIVE_PAGE_FAULT

2018-03-28 Thread Laurent Dufour
On 28/03/2018 12:16, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > >>>> This configuration variable will be used to build the code needed to >>>> handle speculative page fault. >>>> >>>> By default it is turned off

Re: [PATCH v9 01/24] mm: Introduce CONFIG_SPECULATIVE_PAGE_FAULT

2018-03-28 Thread Laurent Dufour
On 28/03/2018 12:16, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > >>>> This configuration variable will be used to build the code needed to >>>> handle speculative page fault. >>>> >>>> By default it is turned off

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

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

Re: [PATCH v9 04/24] mm: Prepare for FAULT_FLAG_SPECULATIVE

2018-03-28 Thread Laurent Dufour
On 25/03/2018 23:50, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> From: Peter Zijlstra <pet...@infradead.org> >> >> When speculating faults (without holding mmap_sem) we need to validate >> that the vma against which we loaded page

Re: [PATCH v9 04/24] mm: Prepare for FAULT_FLAG_SPECULATIVE

2018-03-28 Thread Laurent Dufour
On 25/03/2018 23:50, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> From: Peter Zijlstra >> >> When speculating faults (without holding mmap_sem) we need to validate >> that the vma against which we loaded pages is still valid when we're &

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 >> @@ -

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 >> @@ -

Re: [PATCH v9 05/24] mm: Introduce pte_spinlock for FAULT_FLAG_SPECULATIVE

2018-03-28 Thread Laurent Dufour
On 25/03/2018 23:50, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> When handling page fault without holding the mmap_sem the fetch of the >> pte lock pointer and the locking will have to be done while ensuring >> that the VMA is not touched in

Re: [PATCH v9 05/24] mm: Introduce pte_spinlock for FAULT_FLAG_SPECULATIVE

2018-03-28 Thread Laurent Dufour
On 25/03/2018 23:50, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> When handling page fault without holding the mmap_sem the fetch of the >> pte lock pointer and the locking will have to be done while ensuring >> that the VMA is not touched in

Re: [PATCH v9 01/24] mm: Introduce CONFIG_SPECULATIVE_PAGE_FAULT

2018-03-28 Thread Laurent Dufour
Hi David, Thanks a lot for your deep review on this series. On 25/03/2018 23:50, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> This configuration variable will be used to build the code needed to >> handle speculative page fault. >> >&g

Re: [PATCH v9 01/24] mm: Introduce CONFIG_SPECULATIVE_PAGE_FAULT

2018-03-28 Thread Laurent Dufour
Hi David, Thanks a lot for your deep review on this series. On 25/03/2018 23:50, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> This configuration variable will be used to build the code needed to >> handle speculative page fault. >> >&g

Re: [RFC PATCH 1/8] mm: mmap: unmap large mapping by section

2018-03-23 Thread Laurent Dufour
On 22/03/2018 17:46, Yang Shi wrote: > > > On 3/22/18 9:18 AM, Laurent Dufour wrote: >> >> On 22/03/2018 17:05, Matthew Wilcox wrote: >>> On Thu, Mar 22, 2018 at 04:54:52PM +0100, Laurent Dufour wrote: >>>> On 22/03/2018 16:40, Matthew Wilcox wrote: >

Re: [RFC PATCH 1/8] mm: mmap: unmap large mapping by section

2018-03-23 Thread Laurent Dufour
On 22/03/2018 17:46, Yang Shi wrote: > > > On 3/22/18 9:18 AM, Laurent Dufour wrote: >> >> On 22/03/2018 17:05, Matthew Wilcox wrote: >>> On Thu, Mar 22, 2018 at 04:54:52PM +0100, Laurent Dufour wrote: >>>> On 22/03/2018 16:40, Matthew Wilcox wrote: >

Re: [RFC PATCH 1/8] mm: mmap: unmap large mapping by section

2018-03-22 Thread Laurent Dufour
On 22/03/2018 17:13, Matthew Wilcox wrote: > On Thu, Mar 22, 2018 at 09:06:14AM -0700, Yang Shi wrote: >> On 3/22/18 2:10 AM, Michal Hocko wrote: >>> On Wed 21-03-18 15:36:12, Yang Shi wrote: On 3/21/18 2:23 PM, Michal Hocko wrote: > On Wed 21-03-18 10:16:41, Yang Shi wrote: >>

<    1   2   3   4   5   6   7   8   9   10   >