[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110727125007.GD4024@tiehlicka.suse.cz>
Date: Wed, 27 Jul 2011 14:50:08 +0200
From: Michal Hocko <mhocko@...e.cz>
To: Johannes Weiner <jweiner@...hat.com>
Cc: linux-mm@...ck.org, Dave Chinner <david@...morbit.com>,
Christoph Hellwig <hch@...radead.org>,
Mel Gorman <mgorman@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Wu Fengguang <fengguang.wu@...el.com>,
Rik van Riel <riel@...hat.com>,
Minchan Kim <minchan.kim@...il.com>, Jan Kara <jack@...e.cz>,
Andi Kleen <ak@...ux.intel.com>, linux-kernel@...r.kernel.org
Subject: Re: [patch 1/5] mm: page_alloc: increase __GFP_BITS_SHIFT to include
__GFP_OTHER_NODE
On Mon 25-07-11 22:19:15, Johannes Weiner wrote:
> From: Johannes Weiner <hannes@...xchg.org>
>
> __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 <hannes@...xchg.org>
Reviewed-by: Michal Hocko <mhocko@...e.cz>
> ---
> include/linux/gfp.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> 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 */
> --
> 1.7.6
--
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists