Commit aea47ff363c15b0be5fc27ed991b1fdee338f0a7

Authored by Christoph Lameter
Committed by Linus Torvalds
1 parent 45b07ef31d

[PATCH] mm: make hugepages obey cpusets.

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>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -12,6 +12,7 @@
12 12 #include <linux/nodemask.h>
13 13 #include <linux/pagemap.h>
14 14 #include <linux/mempolicy.h>
  15 +#include <linux/cpuset.h>
15 16  
16 17 #include <asm/page.h>
17 18 #include <asm/pgtable.h>
... ... @@ -48,7 +49,8 @@
48 49  
49 50 for (z = zonelist->zones; *z; z++) {
50 51 nid = (*z)->zone_pgdat->node_id;
51   - if (!list_empty(&hugepage_freelists[nid]))
  52 + if (cpuset_zone_allowed(*z, GFP_HIGHUSER) &&
  53 + !list_empty(&hugepage_freelists[nid]))
52 54 break;
53 55 }
54 56