Fixes to vma_migratable() Remove check for VM_RESERVED: Now only used for statistical purposes. Remove check for VM_DENYWRITE: Moving pages is not writing to them Remove check for SHM pages: KAMEZAWA Hiroyuki confirms that migrating SHM pages works. Add a check for VM_HUGETLB. There is already a separate check for huge pages in check_range() this is just in order to have a clean implementation. A hugetlb vma cannot easily be migrated since the page sizes are different. Signed-off-by: Christoph Lameter Index: linux-2.6.15-rc5/mm/mempolicy.c =================================================================== --- linux-2.6.15-rc5.orig/mm/mempolicy.c 2005-12-05 11:15:24.000000000 -0800 +++ linux-2.6.15-rc5/mm/mempolicy.c 2005-12-05 11:17:09.000000000 -0800 @@ -291,7 +291,7 @@ static inline int check_pgd_range(struct static inline int vma_migratable(struct vm_area_struct *vma) { if (vma->vm_flags & ( - VM_LOCKED|VM_IO|VM_RESERVED|VM_PFNMAP|VM_DENYWRITE|VM_SHM)) + VM_LOCKED|VM_IO|VM_HUGETLB|VM_PFNMAP)) return 0; return 1; }