From: Johannes Weiner Date: Wed, 3 Aug 2011 23:21:09 +0000 (-0700) Subject: mm: page_alloc: increase __GFP_BITS_SHIFT to include __GFP_OTHER_NODE X-Git-Tag: upstream/snapshot3+hdmi~9377 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3dab1bce8e840606e76f1bad5a009328e2aa35c7;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git mm: page_alloc: increase __GFP_BITS_SHIFT to include __GFP_OTHER_NODE __GFP_OTHER_NODE is used for NUMA allocations on behalf of other nodes. It's supposed to be passed through from the page allocator to zone_statistics(), but it never gets there as gfp_allowed_mask is not wide enough and masks out the flag early in the allocation path. The result is an accounting glitch where successful NUMA allocations by-agent are not properly attributed as local. Increase __GFP_BITS_SHIFT so that it includes __GFP_OTHER_NODE. Signed-off-by: Johannes Weiner Acked-by: Andi Kleen Reviewed-by: Minchan Kim Acked-by: Mel Gorman Reviewed-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/gfp.h b/include/linux/gfp.h index cb40892..3a76faf 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -92,7 +92,7 @@ struct vm_area_struct; */ #define __GFP_NOTRACK_FALSE_POSITIVE (__GFP_NOTRACK) -#define __GFP_BITS_SHIFT 23 /* Room for 23 __GFP_FOO bits */ +#define __GFP_BITS_SHIFT 24 /* Room for N __GFP_FOO bits */ #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) /* This equals 0, but use constants in case they ever change */