提交 f4598c8b 编写于 作者: C Christoph Lameter 提交者: Linus Torvalds

[PATCH] migration: make sure there is no attempt to migrate reserved pages.

This ensures that reserved pages are not migrated.  Reserved pages
currently cause the WARN_ON to trigger in migrate_page_add()
Signed-off-by: NChristoph Lameter <clameter@sgi.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 1bc691d3
...@@ -208,6 +208,8 @@ static int check_pte_range(struct vm_area_struct *vma, pmd_t *pmd, ...@@ -208,6 +208,8 @@ static int check_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
page = vm_normal_page(vma, addr, *pte); page = vm_normal_page(vma, addr, *pte);
if (!page) if (!page)
continue; continue;
if (PageReserved(page))
continue;
nid = page_to_nid(page); nid = page_to_nid(page);
if (node_isset(nid, *nodes) == !!(flags & MPOL_MF_INVERT)) if (node_isset(nid, *nodes) == !!(flags & MPOL_MF_INVERT))
continue; continue;
...@@ -290,7 +292,7 @@ static inline int check_pgd_range(struct vm_area_struct *vma, ...@@ -290,7 +292,7 @@ static inline int check_pgd_range(struct vm_area_struct *vma,
static inline int vma_migratable(struct vm_area_struct *vma) static inline int vma_migratable(struct vm_area_struct *vma)
{ {
if (vma->vm_flags & ( if (vma->vm_flags & (
VM_LOCKED|VM_IO|VM_HUGETLB|VM_PFNMAP)) VM_LOCKED|VM_IO|VM_HUGETLB|VM_PFNMAP|VM_RESERVED))
return 0; return 0;
return 1; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册