mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] MM/PAGE_ALLOC add __meminit to alloc_pages_exact_nid
@ 2014-06-10 17:36 Fabian Frederick
  2014-06-10 22:54 ` David Rientjes
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Frederick @ 2014-06-10 17:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Mel Gorman, Andrew Morton

alloc_pages_exact_nid is only called by
__meminit alloc_page_cgroup

Cc: Mel Gorman <mgorman@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 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);
-- 
1.8.4.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] MM/PAGE_ALLOC add __meminit to alloc_pages_exact_nid
  2014-06-10 17:36 [PATCH 1/1] MM/PAGE_ALLOC add __meminit to alloc_pages_exact_nid Fabian Frederick
@ 2014-06-10 22:54 ` David Rientjes
  2014-06-10 23:04   ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: David Rientjes @ 2014-06-10 22:54 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: linux-kernel, Mel Gorman, Andrew Morton

On Tue, 10 Jun 2014, Fabian Frederick wrote:

> alloc_pages_exact_nid is only called by
> __meminit alloc_page_cgroup
> 
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  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()?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] MM/PAGE_ALLOC add __meminit to alloc_pages_exact_nid
  2014-06-10 22:54 ` David Rientjes
@ 2014-06-10 23:04   ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2014-06-10 23:04 UTC (permalink / raw)
  To: David Rientjes; +Cc: Fabian Frederick, linux-kernel, Mel Gorman

On Tue, 10 Jun 2014 15:54:41 -0700 (PDT) David Rientjes <rientjes@google.com> wrote:

> Memcg cannot be compiled as a module, so why are we using EXPORT_SYMBOL()?


From: Andrew Morton <akpm@linux-foundation.org>
Subject: mm/page_alloc.c: unexport alloc_pages_exact_nid()

It is only called by mm/page_cgroup.c whcih cannot be modular.

Reported-by: David Rientjes <rientjes@google.com>
Cc: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_alloc.c |    1 -
 1 file changed, 1 deletion(-)

diff -puN mm/page_alloc.c~mm-page_allocc-unexport-alloc_pages_exact_nid mm/page_alloc.c
--- a/mm/page_alloc.c~mm-page_allocc-unexport-alloc_pages_exact_nid
+++ a/mm/page_alloc.c
@@ -2957,7 +2957,6 @@ void * __meminit alloc_pages_exact_nid(i
 		return NULL;
 	return make_alloc_exact((unsigned long)page_address(p), order, size);
 }
-EXPORT_SYMBOL(alloc_pages_exact_nid);
 
 /**
  * free_pages_exact - release memory allocated via alloc_pages_exact()
_


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-10 23:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-10 17:36 [PATCH 1/1] MM/PAGE_ALLOC add __meminit to alloc_pages_exact_nid Fabian Frederick
2014-06-10 22:54 ` David Rientjes
2014-06-10 23:04   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®