linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: page allocator: Silence build_all_zonelists() section mismatch.
@ 2011-03-22 13:30 Paul Mundt
  2011-03-23 10:38 ` Mel Gorman
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Mundt @ 2011-03-22 13:30 UTC (permalink / raw)
  To: Mel Gorman, Andrew Morton; +Cc: KAMEZAWA Hiroyuki, linux-mm, linux-kernel

The memory hotplug case involves calling to build_all_zonelists() which
in turns calls in to setup_zone_pageset(). The latter is marked
__meminit while build_all_zonelists() itself has no particular
annotation. build_all_zonelists() is only handed a non-NULL pointer in
the case of memory hotplug through an existing __meminit path, so the
setup_zone_pageset() reference is always safe.

The options as such are either to flag build_all_zonelists() as __ref (as
per __build_all_zonelists()), or to simply discard the __meminit
annotation from setup_zone_pageset().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

---

While discarding the __meminit annotation from setup_zone_pageset() is
probably cleanest I expected some people would take issue with this so
opted for the more visually offensive __ref route. I can resend for the
other way if people prefer, or someone else can do it given that it's a
trivial change.

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

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 7945247..134e0b8 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3110,7 +3110,7 @@ static __init_refok int __build_all_zonelists(void *data)
  * Called with zonelists_mutex held always
  * unless system_state == SYSTEM_BOOTING.
  */
-void build_all_zonelists(void *data)
+void __ref build_all_zonelists(void *data)
 {
 	set_zonelist_order();
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm: page allocator: Silence build_all_zonelists() section mismatch.
  2011-03-22 13:30 [PATCH] mm: page allocator: Silence build_all_zonelists() section mismatch Paul Mundt
@ 2011-03-23 10:38 ` Mel Gorman
  0 siblings, 0 replies; 2+ messages in thread
From: Mel Gorman @ 2011-03-23 10:38 UTC (permalink / raw)
  To: Paul Mundt; +Cc: Andrew Morton, KAMEZAWA Hiroyuki, linux-mm, linux-kernel

On Tue, Mar 22, 2011 at 10:30:45PM +0900, Paul Mundt wrote:
> The memory hotplug case involves calling to build_all_zonelists() which
> in turns calls in to setup_zone_pageset(). The latter is marked
> __meminit while build_all_zonelists() itself has no particular
> annotation. build_all_zonelists() is only handed a non-NULL pointer in
> the case of memory hotplug through an existing __meminit path, so the
> setup_zone_pageset() reference is always safe.
> 
> The options as such are either to flag build_all_zonelists() as __ref (as
> per __build_all_zonelists()), or to simply discard the __meminit
> annotation from setup_zone_pageset().
> 
> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
> 
> ---
> 
> While discarding the __meminit annotation from setup_zone_pageset() is
> probably cleanest I expected some people would take issue with this so
> opted for the more visually offensive __ref route. I can resend for the
> other way if people prefer, or someone else can do it given that it's a
> trivial change.
> 
>  mm/page_alloc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Discarding __meminit from setup_zone_pageset() would unnecessarily grow
the kernel image in the !HOTPLUG case and setting __meminit on
build_all_zonelists() looks like it would just cause other section
mistmatch warnings so;

Acked-by: Mel Gorman <mel@csn.ul.ie>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2011-03-23 10:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 13:30 [PATCH] mm: page allocator: Silence build_all_zonelists() section mismatch Paul Mundt
2011-03-23 10:38 ` Mel Gorman

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).