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 <clameter@sgi.com>
Acked-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
#include <linux/nodemask.h>
#include <linux/pagemap.h>
#include <linux/mempolicy.h>
+#include <linux/cpuset.h>
#include <asm/page.h>
#include <asm/pgtable.h>
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;
}