All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: disable numa migration faults for dax vmas
@ 2016-11-12  4:21 ` Dan Williams
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Williams @ 2016-11-12  4:21 UTC (permalink / raw)
  To: akpm
  Cc: Michal Hocko, linux-nvdimm, linux-kernel, linux-mm,
	Kirill A. Shutemov, Vlastimil Babka, Aneesh Kumar K.V

Mark dax vmas as not migratable to exclude them from task_numa_work().
This is especially relevant for device-dax which wants to ensure
predictable access latency and not incur periodic faults.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 include/linux/mempolicy.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 5e5b2969d931..d72c691afaa6 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -7,6 +7,7 @@
 
 
 #include <linux/mmzone.h>
+#include <linux/dax.h>
 #include <linux/slab.h>
 #include <linux/rbtree.h>
 #include <linux/spinlock.h>
@@ -177,6 +178,9 @@ static inline bool vma_migratable(struct vm_area_struct *vma)
 	if (vma->vm_flags & (VM_IO | VM_PFNMAP))
 		return false;
 
+	if (vma_is_dax(vma))
+		return false;
+
 #ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
 	if (vma->vm_flags & VM_HUGETLB)
 		return false;

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] mm: disable numa migration faults for dax vmas
@ 2016-11-12  4:21 ` Dan Williams
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Williams @ 2016-11-12  4:21 UTC (permalink / raw)
  To: akpm
  Cc: Michal Hocko, linux-nvdimm, linux-kernel, linux-mm,
	Kirill A. Shutemov, Vlastimil Babka, Aneesh Kumar K.V

Mark dax vmas as not migratable to exclude them from task_numa_work().
This is especially relevant for device-dax which wants to ensure
predictable access latency and not incur periodic faults.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 include/linux/mempolicy.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 5e5b2969d931..d72c691afaa6 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -7,6 +7,7 @@
 
 
 #include <linux/mmzone.h>
+#include <linux/dax.h>
 #include <linux/slab.h>
 #include <linux/rbtree.h>
 #include <linux/spinlock.h>
@@ -177,6 +178,9 @@ static inline bool vma_migratable(struct vm_area_struct *vma)
 	if (vma->vm_flags & (VM_IO | VM_PFNMAP))
 		return false;
 
+	if (vma_is_dax(vma))
+		return false;
+
 #ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
 	if (vma->vm_flags & VM_HUGETLB)
 		return false;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] mm: disable numa migration faults for dax vmas
@ 2016-11-12  4:21 ` Dan Williams
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Williams @ 2016-11-12  4:21 UTC (permalink / raw)
  To: akpm
  Cc: Michal Hocko, linux-nvdimm, linux-kernel, linux-mm,
	Kirill A. Shutemov, Vlastimil Babka, Aneesh Kumar K.V

Mark dax vmas as not migratable to exclude them from task_numa_work().
This is especially relevant for device-dax which wants to ensure
predictable access latency and not incur periodic faults.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 include/linux/mempolicy.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 5e5b2969d931..d72c691afaa6 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -7,6 +7,7 @@
 
 
 #include <linux/mmzone.h>
+#include <linux/dax.h>
 #include <linux/slab.h>
 #include <linux/rbtree.h>
 #include <linux/spinlock.h>
@@ -177,6 +178,9 @@ static inline bool vma_migratable(struct vm_area_struct *vma)
 	if (vma->vm_flags & (VM_IO | VM_PFNMAP))
 		return false;
 
+	if (vma_is_dax(vma))
+		return false;
+
 #ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
 	if (vma->vm_flags & VM_HUGETLB)
 		return false;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm: disable numa migration faults for dax vmas
  2016-11-12  4:21 ` Dan Williams
@ 2016-11-15  0:25   ` Andrew Morton
  -1 siblings, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2016-11-15  0:25 UTC (permalink / raw)
  To: Dan Williams
  Cc: Michal Hocko, linux-nvdimm, linux-kernel, linux-mm,
	Kirill A. Shutemov, Vlastimil Babka, Aneesh Kumar K.V

On Fri, 11 Nov 2016 20:21:41 -0800 Dan Williams <dan.j.williams@intel.com> wrote:

> Mark dax vmas as not migratable to exclude them from task_numa_work().
> This is especially relevant for device-dax which wants to ensure
> predictable access latency and not incur periodic faults.
>
> ...
>
> @@ -177,6 +178,9 @@ static inline bool vma_migratable(struct vm_area_struct *vma)
>  	if (vma->vm_flags & (VM_IO | VM_PFNMAP))
>  		return false;
>  
> +	if (vma_is_dax(vma))
> +		return false;
> +
>  #ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
>  	if (vma->vm_flags & VM_HUGETLB)
>  		return false;

I don't think the reader could figure out why this code is here, so...  this?

--- a/include/linux/mempolicy.h~mm-disable-numa-migration-faults-for-dax-vmas-fix
+++ a/include/linux/mempolicy.h
@@ -180,6 +180,10 @@ static inline bool vma_migratable(struct
 	if (vma->vm_flags & (VM_IO | VM_PFNMAP))
 		return false;
 
+	/*
+	 * DAX device mappings require predictable access latency, so avoid
+	 * incurring periodic faults.
+	 */
 	if (vma_is_dax(vma))
 		return false;
 
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm: disable numa migration faults for dax vmas
@ 2016-11-15  0:25   ` Andrew Morton
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2016-11-15  0:25 UTC (permalink / raw)
  To: Dan Williams
  Cc: Michal Hocko, linux-nvdimm, linux-kernel, linux-mm,
	Kirill A. Shutemov, Vlastimil Babka, Aneesh Kumar K.V

On Fri, 11 Nov 2016 20:21:41 -0800 Dan Williams <dan.j.williams@intel.com> wrote:

> Mark dax vmas as not migratable to exclude them from task_numa_work().
> This is especially relevant for device-dax which wants to ensure
> predictable access latency and not incur periodic faults.
>
> ...
>
> @@ -177,6 +178,9 @@ static inline bool vma_migratable(struct vm_area_struct *vma)
>  	if (vma->vm_flags & (VM_IO | VM_PFNMAP))
>  		return false;
>  
> +	if (vma_is_dax(vma))
> +		return false;
> +
>  #ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
>  	if (vma->vm_flags & VM_HUGETLB)
>  		return false;

I don't think the reader could figure out why this code is here, so...  this?

--- a/include/linux/mempolicy.h~mm-disable-numa-migration-faults-for-dax-vmas-fix
+++ a/include/linux/mempolicy.h
@@ -180,6 +180,10 @@ static inline bool vma_migratable(struct
 	if (vma->vm_flags & (VM_IO | VM_PFNMAP))
 		return false;
 
+	/*
+	 * DAX device mappings require predictable access latency, so avoid
+	 * incurring periodic faults.
+	 */
 	if (vma_is_dax(vma))
 		return false;
 
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm: disable numa migration faults for dax vmas
  2016-11-15  0:25   ` Andrew Morton
@ 2016-11-15  1:06     ` Dan Williams
  -1 siblings, 0 replies; 7+ messages in thread
From: Dan Williams @ 2016-11-15  1:06 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Hocko, linux-nvdimm, linux-kernel, Linux MM,
	Kirill A. Shutemov, Vlastimil Babka, Aneesh Kumar K.V

On Mon, Nov 14, 2016 at 4:25 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Fri, 11 Nov 2016 20:21:41 -0800 Dan Williams <dan.j.williams@intel.com> wrote:
>
>> Mark dax vmas as not migratable to exclude them from task_numa_work().
>> This is especially relevant for device-dax which wants to ensure
>> predictable access latency and not incur periodic faults.
>>
>> ...
>>
>> @@ -177,6 +178,9 @@ static inline bool vma_migratable(struct vm_area_struct *vma)
>>       if (vma->vm_flags & (VM_IO | VM_PFNMAP))
>>               return false;
>>
>> +     if (vma_is_dax(vma))
>> +             return false;
>> +
>>  #ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
>>       if (vma->vm_flags & VM_HUGETLB)
>>               return false;
>
> I don't think the reader could figure out why this code is here, so...  this?
>
> --- a/include/linux/mempolicy.h~mm-disable-numa-migration-faults-for-dax-vmas-fix
> +++ a/include/linux/mempolicy.h
> @@ -180,6 +180,10 @@ static inline bool vma_migratable(struct
>         if (vma->vm_flags & (VM_IO | VM_PFNMAP))
>                 return false;
>
> +       /*
> +        * DAX device mappings require predictable access latency, so avoid
> +        * incurring periodic faults.
> +        */
>         if (vma_is_dax(vma))
>                 return false;
>

Yes, thanks for fixing it up.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm: disable numa migration faults for dax vmas
@ 2016-11-15  1:06     ` Dan Williams
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Williams @ 2016-11-15  1:06 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Hocko, linux-nvdimm, linux-kernel, Linux MM,
	Kirill A. Shutemov, Vlastimil Babka, Aneesh Kumar K.V

On Mon, Nov 14, 2016 at 4:25 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Fri, 11 Nov 2016 20:21:41 -0800 Dan Williams <dan.j.williams@intel.com> wrote:
>
>> Mark dax vmas as not migratable to exclude them from task_numa_work().
>> This is especially relevant for device-dax which wants to ensure
>> predictable access latency and not incur periodic faults.
>>
>> ...
>>
>> @@ -177,6 +178,9 @@ static inline bool vma_migratable(struct vm_area_struct *vma)
>>       if (vma->vm_flags & (VM_IO | VM_PFNMAP))
>>               return false;
>>
>> +     if (vma_is_dax(vma))
>> +             return false;
>> +
>>  #ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
>>       if (vma->vm_flags & VM_HUGETLB)
>>               return false;
>
> I don't think the reader could figure out why this code is here, so...  this?
>
> --- a/include/linux/mempolicy.h~mm-disable-numa-migration-faults-for-dax-vmas-fix
> +++ a/include/linux/mempolicy.h
> @@ -180,6 +180,10 @@ static inline bool vma_migratable(struct
>         if (vma->vm_flags & (VM_IO | VM_PFNMAP))
>                 return false;
>
> +       /*
> +        * DAX device mappings require predictable access latency, so avoid
> +        * incurring periodic faults.
> +        */
>         if (vma_is_dax(vma))
>                 return false;
>

Yes, thanks for fixing it up.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-11-15  1:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-12  4:21 [PATCH] mm: disable numa migration faults for dax vmas Dan Williams
2016-11-12  4:21 ` Dan Williams
2016-11-12  4:21 ` Dan Williams
2016-11-15  0:25 ` Andrew Morton
2016-11-15  0:25   ` Andrew Morton
2016-11-15  1:06   ` Dan Williams
2016-11-15  1:06     ` Dan Williams

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.