linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] mm, hugetlb: mark some bootstrap functions as __init
@ 2014-02-05  0:13 David Rientjes
  2014-02-05  0:32 ` Davidlohr Bueso
  0 siblings, 1 reply; 2+ messages in thread
From: David Rientjes @ 2014-02-05  0:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Michal Hocko, Joonsoo Kim, linux-kernel, linux-mm

Both prep_compound_huge_page() and prep_compound_gigantic_page() are only
called at bootstrap and can be marked as __init.

The __SetPageTail(page) in prep_compound_gigantic_page() happening before
page->first_page is initialized is not concerning since this is
bootstrap.

Signed-off-by: David Rientjes <rientjes@google.com>
---
 mm/hugetlb.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -653,7 +653,8 @@ static void prep_new_huge_page(struct hstate *h, struct page *page, int nid)
 	put_page(page); /* free it into the hugepage allocator */
 }
 
-static void prep_compound_gigantic_page(struct page *page, unsigned long order)
+static void __init prep_compound_gigantic_page(struct page *page,
+					       unsigned long order)
 {
 	int i;
 	int nr_pages = 1 << order;
@@ -1294,7 +1295,7 @@ found:
 	return 1;
 }
 
-static void prep_compound_huge_page(struct page *page, int order)
+static void __init prep_compound_huge_page(struct page *page, int order)
 {
 	if (unlikely(order > (MAX_ORDER - 1)))
 		prep_compound_gigantic_page(page, order);

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

* Re: [patch] mm, hugetlb: mark some bootstrap functions as __init
  2014-02-05  0:13 [patch] mm, hugetlb: mark some bootstrap functions as __init David Rientjes
@ 2014-02-05  0:32 ` Davidlohr Bueso
  0 siblings, 0 replies; 2+ messages in thread
From: Davidlohr Bueso @ 2014-02-05  0:32 UTC (permalink / raw)
  To: David Rientjes
  Cc: Andrew Morton, Michal Hocko, Joonsoo Kim, linux-kernel, linux-mm

On Tue, 2014-02-04 at 16:13 -0800, David Rientjes wrote:
> Both prep_compound_huge_page() and prep_compound_gigantic_page() are only
> called at bootstrap and can be marked as __init.
> 
> The __SetPageTail(page) in prep_compound_gigantic_page() happening before
> page->first_page is initialized is not concerning since this is
> bootstrap.
> 
> Signed-off-by: David Rientjes <rientjes@google.com>

Reviewed-by: Davidlohr Bueso <davidlohr@hp.com>


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

end of thread, other threads:[~2014-02-05  0:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-05  0:13 [patch] mm, hugetlb: mark some bootstrap functions as __init David Rientjes
2014-02-05  0:32 ` Davidlohr Bueso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).