aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2011-05-24 20:11:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-25 11:39:08 -0400
commit839a4fcc8af7412be2efd11f0bd0504757f79f08 (patch)
tree8387ca9f25f2896dda53c222cd6c7a7cc41b9d74
parent37b23e0525d393d48a7d59f870b3bc061a30ccdb (diff)
mm, mem-hotplug: fix section mismatch. setup_per_zone_inactive_ratio() should be __meminit.
Commit bce7394a3e ("page-allocator: reset wmark_min and inactive ratio of zone when hotplug happens") introduced invalid section references. Now, setup_per_zone_inactive_ratio() is marked __init and then it can't be referenced from memory hotplug code. This patch marks it as __meminit and also marks caller as __ref. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/memory_hotplug.c4
-rw-r--r--mm/page_alloc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 9ca1d604f7cd..2c4edc459fb0 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -400,7 +400,7 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,
400} 400}
401 401
402 402
403int online_pages(unsigned long pfn, unsigned long nr_pages) 403int __ref online_pages(unsigned long pfn, unsigned long nr_pages)
404{ 404{
405 unsigned long onlined_pages = 0; 405 unsigned long onlined_pages = 0;
406 struct zone *zone; 406 struct zone *zone;
@@ -795,7 +795,7 @@ check_pages_isolated(unsigned long start_pfn, unsigned long end_pfn)
795 return offlined; 795 return offlined;
796} 796}
797 797
798static int offline_pages(unsigned long start_pfn, 798static int __ref offline_pages(unsigned long start_pfn,
799 unsigned long end_pfn, unsigned long timeout) 799 unsigned long end_pfn, unsigned long timeout)
800{ 800{
801 unsigned long pfn, nr_pages, expire; 801 unsigned long pfn, nr_pages, expire;
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index eb19ba8396c3..56d0be36be9d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5094,7 +5094,7 @@ void setup_per_zone_wmarks(void)
5094 * 1TB 101 10GB 5094 * 1TB 101 10GB
5095 * 10TB 320 32GB 5095 * 10TB 320 32GB
5096 */ 5096 */
5097void calculate_zone_inactive_ratio(struct zone *zone) 5097void __meminit calculate_zone_inactive_ratio(struct zone *zone)
5098{ 5098{
5099 unsigned int gb, ratio; 5099 unsigned int gb, ratio;
5100 5100
@@ -5108,7 +5108,7 @@ void calculate_zone_inactive_ratio(struct zone *zone)
5108 zone->inactive_ratio = ratio; 5108 zone->inactive_ratio = ratio;
5109} 5109}
5110 5110
5111static void __init setup_per_zone_inactive_ratio(void) 5111static void __meminit setup_per_zone_inactive_ratio(void)
5112{ 5112{
5113 struct zone *zone; 5113 struct zone *zone;
5114 5114