From: Christoph Lameter See http://marc.theaimsgroup.com/?l=linux-kernel&m=113167000201265&w=2 http://marc.theaimsgroup.com/?l=linux-mm&m=113167267527312&w=2 Make hugepages obey cpusets. Signed-off-by: Christoph Lameter Acked-by: William Irwin Signed-off-by: Andrew Morton --- mm/hugetlb.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -puN mm/hugetlb.c~mm-make-hugepages-obey-cpusets mm/hugetlb.c --- devel/mm/hugetlb.c~mm-make-hugepages-obey-cpusets 2005-11-15 21:18:16.000000000 -0800 +++ devel-akpm/mm/hugetlb.c 2005-11-15 21:18:33.000000000 -0800 @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -44,7 +45,8 @@ static struct page *dequeue_huge_page(st for (z = zonelist->zones; *z; z++) { nid = (*z)->zone_pgdat->node_id; - if (!list_empty(&hugepage_freelists[nid])) + if (cpuset_zone_allowed(*z, GFP_HIGHUSER) && + !list_empty(&hugepage_freelists[nid])) break; } _