提交 84919aed 编写于 作者: A Anshuman Khandual 提交者: Xie XiuQi

mm: Ignore madvise(MADV_MERGEABLE) request for VM_CDM marked VMAs

euler inclusion
category: feature
bugzilla: 11082
CVE: NA
-------------------

VMA containing CDM memory should be excluded from KSM merging. This change
makes madvise(MADV_MERGEABLE) request on target VMA to be ignored.
Signed-off-by: NAnshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Nzhong jiang <zhongjiang@huawei.com>
Signed-off-by: NLijun Fang <fanglijun3@huawei.com>
Reviewed-by: Nzhong jiang <zhongjiang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 90cd24b6
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <linux/freezer.h> #include <linux/freezer.h>
#include <linux/oom.h> #include <linux/oom.h>
#include <linux/numa.h> #include <linux/numa.h>
#include <linux/mempolicy.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include "internal.h" #include "internal.h"
...@@ -2458,6 +2459,9 @@ int ksm_madvise(struct vm_area_struct *vma, unsigned long start, ...@@ -2458,6 +2459,9 @@ int ksm_madvise(struct vm_area_struct *vma, unsigned long start,
if (vma_is_dax(vma)) if (vma_is_dax(vma))
return 0; return 0;
if (is_cdm_vma(vma))
return 0;
#ifdef VM_SAO #ifdef VM_SAO
if (*vm_flags & VM_SAO) if (*vm_flags & VM_SAO)
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册