Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1569419
| From | Anshuman Khandual <khandual@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC V2 09/12] mm: Exclude CDM marked VMAs from auto NUMA |
| Date | 2017-01-30 07:10 +0100 |
| Message-ID | <t5dk5-se-7@gated-at.bofh.it> (permalink) |
| References | <t5aYV-7mm-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Kernel cannot track device memory accesses behind VMAs containing CDM
memory. Hence all the VM_CDM marked VMAs should not be part of the auto
NUMA migration scheme. This patch also adds a new function is_cdm_vma()
to detect any VMA marked with flag VM_CDM.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
include/linux/mempolicy.h | 14 ++++++++++++++
kernel/sched/fair.c | 3 ++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 5f4d828..ff0c6bc 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -172,6 +172,20 @@ extern int mpol_parse_str(char *str, struct mempolicy **mpol);
extern void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol);
+#ifdef CONFIG_COHERENT_DEVICE
+static inline bool is_cdm_vma(struct vm_area_struct *vma)
+{
+ if (vma->vm_flags & VM_CDM)
+ return true;
+ return false;
+}
+#else
+static inline bool is_cdm_vma(struct vm_area_struct *vma)
+{
+ return false;
+}
+#endif
+
/* Check if a vma is migratable */
static inline bool vma_migratable(struct vm_area_struct *vma)
{
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6559d19..523508c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2482,7 +2482,8 @@ void task_numa_work(struct callback_head *work)
}
for (; vma; vma = vma->vm_next) {
if (!vma_migratable(vma) || !vma_policy_mof(vma) ||
- is_vm_hugetlb_page(vma) || (vma->vm_flags & VM_MIXEDMAP)) {
+ is_vm_hugetlb_page(vma) || is_cdm_vma(vma) ||
+ (vma->vm_flags & VM_MIXEDMAP)) {
continue;
}
--
2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC V2 00/12] Define coherent device memory node Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:40 +0100
[RFC V2 05/12] cpuset: Add cpuset_inc() inside cpuset_init() Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:40 +0100
Re: [RFC V2 05/12] cpuset: Add cpuset_inc() inside cpuset_init() Dave Hansen <dave.hansen@intel.com> - 2017-01-30 19:20 +0100
[RFC V2 04/12] mm: Change mbind(MPOL_BIND) implementation for CDM nodes Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:40 +0100
[DEBUG 16/21] mm: Enable CONFIG_MOVABLE_NODE on powerpc Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:50 +0100
[DEBUG 18/21] mm: Add debugfs interface to dump each node's zonelist information Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:50 +0100
[DEBUG 19/21] mm: Add migrate_virtual_range migration interface Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:50 +0100
[DEBUG 17/21] mm: Export definition of 'zone_names' array through mmzone.h Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:50 +0100
[DEBUG 15/21] powerpc/mm: Enable CONFIG_MOVABLE_NODE for PPC64 platform Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:50 +0100
[DEBUG 21/21] selftests/powerpc: Add a script to perform random VMA migrations Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:50 +0100
[DEBUG 14/21] powerpc/mm: Create numa nodes for hotplug memory Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:50 +0100
[DEBUG 13/21] powerpc/mm: Identify coherent device memory nodes during platform init Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:50 +0100
[DEBUG 20/21] drivers: Add two drivers for coherent device memory tests Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 04:50 +0100
[RFC V2 09/12] mm: Exclude CDM marked VMAs from auto NUMA Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 07:10 +0100
[RFC V2 12/12] mm: Tag VMA with VM_CDM flag explicitly during mbind(MPOL_BIND) Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 07:20 +0100
Re: [RFC V2 12/12] mm: Tag VMA with VM_CDM flag explicitly during mbind(MPOL_BIND) Dave Hansen <dave.hansen@intel.com> - 2017-01-30 19:00 +0100
[RFC V2 10/12] mm: Ignore madvise(MADV_MERGEABLE) request for VM_CDM marked VMAs Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 10:30 +0100
[RFC V2 11/12] mm: Tag VMA with VM_CDM flag during page fault Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-01-30 10:40 +0100
Re: [RFC V2 11/12] mm: Tag VMA with VM_CDM flag during page fault Dave Hansen <dave.hansen@intel.com> - 2017-01-30 19:00 +0100
csiph-web