Re: [PATCH] mm: disable numa migration faults for dax vmas

2016-11-14 Thread Dan Williams
On Mon, Nov 14, 2016 at 4:25 PM, Andrew Morton
 wrote:
> On Fri, 11 Nov 2016 20:21:41 -0800 Dan Williams  
> 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.


Re: [PATCH] mm: disable numa migration faults for dax vmas

2016-11-14 Thread Dan Williams
On Mon, Nov 14, 2016 at 4:25 PM, Andrew Morton
 wrote:
> On Fri, 11 Nov 2016 20:21:41 -0800 Dan Williams  
> 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.


Re: [PATCH] mm: disable numa migration faults for dax vmas

2016-11-14 Thread Andrew Morton
On Fri, 11 Nov 2016 20:21:41 -0800 Dan Williams  
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;
 
_



Re: [PATCH] mm: disable numa migration faults for dax vmas

2016-11-14 Thread Andrew Morton
On Fri, 11 Nov 2016 20:21:41 -0800 Dan Williams  
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;
 
_



[PATCH] mm: disable numa migration faults for dax vmas

2016-11-11 Thread Dan Williams
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 
Cc: Michal Hocko 
Cc: Vlastimil Babka 
Cc: "Kirill A. Shutemov" 
Reported-by: Aneesh Kumar K.V 
Signed-off-by: Dan Williams 
---
 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 
+#include 
 #include 
 #include 
 #include 
@@ -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;



[PATCH] mm: disable numa migration faults for dax vmas

2016-11-11 Thread Dan Williams
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 
Cc: Michal Hocko 
Cc: Vlastimil Babka 
Cc: "Kirill A. Shutemov" 
Reported-by: Aneesh Kumar K.V 
Signed-off-by: Dan Williams 
---
 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 
+#include 
 #include 
 #include 
 #include 
@@ -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;