Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1506873 > unrolled thread
| Started by | Anshuman Khandual <khandual@linux.vnet.ibm.com> |
|---|---|
| First post | 2016-10-24 06:40 +0200 |
| Last post | 2016-10-24 06:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RFC 6/8] mm: Make VM_CDM marked VMAs non migratable Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-10-24 06:40 +0200
| From | Anshuman Khandual <khandual@linux.vnet.ibm.com> |
|---|---|
| Date | 2016-10-24 06:40 +0200 |
| Subject | [RFC 6/8] mm: Make VM_CDM marked VMAs non migratable |
| Message-ID | <svFdf-2Fn-27@gated-at.bofh.it> |
Auto NUMA does migratability check on any given VMA before scanning it for
marking purpose. For now if the coherent device memory has been faulted in
or migrated into a process VMA, it should not be part of the auto NUMA
migration scheme. The check is based on VM_CDM flag.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
include/linux/mempolicy.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 5e5b296..09d4b70 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -171,9 +171,26 @@ 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 bool is_cdm_vma(struct vm_area_struct *vma)
+{
+ if (vma->vm_flags & VM_CDM)
+ return true;
+ return false;
+}
+#else
+static 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)
{
+ if (is_cdm_vma(vma))
+ return false;
+
if (vma->vm_flags & (VM_IO | VM_PFNMAP))
return false;
--
2.1.0
Back to top | Article view | linux.kernel
csiph-web