--- include/linux/migrate.h | 9 +++++++++ 1 file changed, 9 insertions(+) Index: linux-2.6.21-rc7-mm2/include/linux/migrate.h =================================================================== --- linux-2.6.21-rc7-mm2.orig/include/linux/migrate.h 2007-04-27 22:37:54.000000000 -0700 +++ linux-2.6.21-rc7-mm2/include/linux/migrate.h 2007-04-27 22:48:29.000000000 -0700 @@ -2,6 +2,7 @@ #define _LINUX_MIGRATE_H #include +#include typedef struct page *new_page_t(struct page *, unsigned long private, int **); @@ -10,6 +11,14 @@ static inline int vma_migratable(struct { if (vma->vm_flags & (VM_IO|VM_HUGETLB|VM_PFNMAP|VM_RESERVED)) return 0; + /* + * Migration allocates pages in the highest zone. If we cannot + * do so then migration (at least from node to node) is not + * possible. + */ + if (vma->vm_file && vma->vm_file->f_mapping && + gfp_zone(vma->vm_file->f_mapping->flags) != policy_zone) + return 0; return 1; }