提交 839a4fcc 编写于 作者: K KOSAKI Motohiro 提交者: Linus Torvalds

mm, mem-hotplug: fix section mismatch. setup_per_zone_inactive_ratio() should be __meminit.

Commit bce7394a ("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: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: NMinchan 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: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 37b23e05
...@@ -400,7 +400,7 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages, ...@@ -400,7 +400,7 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,
} }
int online_pages(unsigned long pfn, unsigned long nr_pages) int __ref online_pages(unsigned long pfn, unsigned long nr_pages)
{ {
unsigned long onlined_pages = 0; unsigned long onlined_pages = 0;
struct zone *zone; struct zone *zone;
...@@ -795,7 +795,7 @@ check_pages_isolated(unsigned long start_pfn, unsigned long end_pfn) ...@@ -795,7 +795,7 @@ check_pages_isolated(unsigned long start_pfn, unsigned long end_pfn)
return offlined; return offlined;
} }
static int offline_pages(unsigned long start_pfn, static int __ref offline_pages(unsigned long start_pfn,
unsigned long end_pfn, unsigned long timeout) unsigned long end_pfn, unsigned long timeout)
{ {
unsigned long pfn, nr_pages, expire; unsigned long pfn, nr_pages, expire;
......
...@@ -5094,7 +5094,7 @@ void setup_per_zone_wmarks(void) ...@@ -5094,7 +5094,7 @@ void setup_per_zone_wmarks(void)
* 1TB 101 10GB * 1TB 101 10GB
* 10TB 320 32GB * 10TB 320 32GB
*/ */
void calculate_zone_inactive_ratio(struct zone *zone) void __meminit calculate_zone_inactive_ratio(struct zone *zone)
{ {
unsigned int gb, ratio; unsigned int gb, ratio;
...@@ -5108,7 +5108,7 @@ void calculate_zone_inactive_ratio(struct zone *zone) ...@@ -5108,7 +5108,7 @@ void calculate_zone_inactive_ratio(struct zone *zone)
zone->inactive_ratio = ratio; zone->inactive_ratio = ratio;
} }
static void __init setup_per_zone_inactive_ratio(void) static void __meminit setup_per_zone_inactive_ratio(void)
{ {
struct zone *zone; struct zone *zone;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册