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 --- 25/mm/page_alloc.c~mm-simplify-__alloc_pages-cpuset-alloc_-flags Mon Nov 14 14:43:15 2005 +++ 25-akpm/mm/page_alloc.c Mon Nov 14 14:43:15 2005 @@ -758,7 +758,6 @@ buffered_rmqueue(struct zone *zone, int #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 @@ -808,11 +807,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; @@ -853,7 +850,7 @@ __alloc_pages(gfp_t gfp_mask, unsigned i } restart: page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, order, - zonelist, ALLOC_CPUSET); + zonelist, 0); if (page) goto got_pg; @@ -875,7 +872,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 @@ -940,7 +936,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; _