From: Paul Jackson Remove ALLOC_CPUSET flag from mm/page_alloc.c:__alloc_pages(). Thanks to the previous patch, it is equivalent to the setting of !ALLOC_NO_WATERMARKS, so redundant. Signed-off-by: Paul Jackson Signed-off-by: Andrew Morton --- mm/page_alloc.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff -puN mm/page_alloc.c~mm-simplify-__alloc_pages-cpuset-alloc_-flags mm/page_alloc.c --- devel/mm/page_alloc.c~mm-simplify-__alloc_pages-cpuset-alloc_-flags 2005-11-22 22:30:22.000000000 -0800 +++ devel-akpm/mm/page_alloc.c 2005-11-22 22:30:22.000000000 -0800 @@ -775,7 +775,6 @@ again: #define ALLOC_NO_WATERMARKS 0x01 /* don't check watermarks at all */ #define ALLOC_HARDER 0x02 /* try to alloc harder */ #define ALLOC_HIGH 0x04 /* __GFP_HIGH set */ -#define ALLOC_CPUSET 0x08 /* check for correct cpuset */ /* * Return 1 if free pages are above 'mark'. This takes into account the order @@ -825,11 +824,9 @@ get_page_from_freelist(gfp_t gfp_mask, u * See also cpuset_zone_allowed() comment in kernel/cpuset.c. */ do { - if ((alloc_flags & ALLOC_CPUSET) && - !cpuset_zone_allowed(*z, gfp_mask)) - continue; - if (!(alloc_flags & ALLOC_NO_WATERMARKS)) { + if (!cpuset_zone_allowed(*z, gfp_mask)) + continue; if (!zone_watermark_ok(*z, order, (*z)->pages_low, classzone_idx, alloc_flags)) continue; @@ -871,7 +868,7 @@ restart: } page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, order, - zonelist, ALLOC_CPUSET); + zonelist, 0); if (page) goto got_pg; @@ -893,7 +890,6 @@ restart: alloc_flags |= ALLOC_HARDER; if (gfp_mask & __GFP_HIGH) alloc_flags |= ALLOC_HIGH; - alloc_flags |= ALLOC_CPUSET; /* * Go through the zonelist again. Let __GFP_HIGH and allocations @@ -958,7 +954,7 @@ rebalance: * under heavy pressure. */ page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, order, - zonelist, ALLOC_CPUSET); + zonelist, 0); if (page) goto got_pg; _