Re: [PATCH 1/1] MM/PAGE_ALLOC add __meminit to alloc_pages_exact_nid

From: David Rientjes
Date: Tue Jun 10 2014 - 18:54:48 EST


On Tue, 10 Jun 2014, Fabian Frederick wrote:

> alloc_pages_exact_nid is only called by
> __meminit alloc_page_cgroup
>
> Cc: Mel Gorman <mgorman@xxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
> ---
> include/linux/gfp.h | 2 +-
> mm/page_alloc.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/gfp.h b/include/linux/gfp.h
> index 6eb1fb3..5e7219d 100644
> --- a/include/linux/gfp.h
> +++ b/include/linux/gfp.h
> @@ -360,7 +360,7 @@ extern unsigned long get_zeroed_page(gfp_t gfp_mask);
> void *alloc_pages_exact(size_t size, gfp_t gfp_mask);
> void free_pages_exact(void *virt, size_t size);
> /* This is different from alloc_pages_exact_node !!! */
> -void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask);
> +void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask);
>
> #define __get_free_page(gfp_mask) \
> __get_free_pages((gfp_mask), 0)
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 4f59fa2..530837e 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2949,7 +2949,7 @@ EXPORT_SYMBOL(alloc_pages_exact);
> * Note this is not alloc_pages_exact_node() which allocates on a specific node,
> * but is not exact.
> */
> -void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask)
> +void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask)
> {
> unsigned order = get_order(size);
> struct page *p = alloc_pages_node(nid, gfp_mask, order);

Memcg cannot be compiled as a module, so why are we using EXPORT_SYMBOL()?
--
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/