RE: [PATCH] dequeue a huge page near to this node

From: Christoph Lameter
Date: Thu Nov 10 2005 - 19:44:40 EST


On Thu, 10 Nov 2005, Chen, Kenneth W wrote:

> Looks great!

Well in that case, we may do even more:

Make huge pages obey cpusets.

Signed-off-by: Christoph Lameter <clameter@xxxxxxx>

Index: linux-2.6.14-mm1/mm/hugetlb.c
===================================================================
--- linux-2.6.14-mm1.orig/mm/hugetlb.c 2005-11-10 15:02:05.000000000 -0800
+++ linux-2.6.14-mm1/mm/hugetlb.c 2005-11-10 16:29:16.000000000 -0800
@@ -11,6 +11,7 @@
#include <linux/highmem.h>
#include <linux/nodemask.h>
#include <linux/pagemap.h>
+#include <linux/cpuset.h>
#include <asm/page.h>
#include <asm/pgtable.h>

@@ -41,7 +42,8 @@ static struct page *dequeue_huge_page(vo

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;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/