diff options
author | Michal Hocko <mhocko@suse.com> | 2017-05-31 09:17:13 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-05-31 09:17:13 +1000 |
commit | 63352bbb651cc81bd3aeacd42864a14a30df7172 (patch) | |
tree | 3314afa29b20e05b72f1cdd478289c9d601da18e /mm/memory_hotplug.c | |
parent | 7cf60ea913ec51b3da2352849db80e5e10ae37a6 (diff) | |
download | linux-next-63352bbb651cc81bd3aeacd42864a14a30df7172.tar.gz |
fold me "mm: consider zone which is not fully populated to have holes"
- check valid section number in pfn_to_online_page - Vlastimil
- mark sections online after all struct pages are initialized in
online_pages_range - Vlastimil
Link: http://lkml.kernel.org/r/20170518164210.GD18333@dhcp22.suse.cz
Signed-off-by: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r-- | mm/memory_hotplug.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index c3a146028ba6..b2d2e954348b 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -930,8 +930,6 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages, unsigned long onlined_pages = *(unsigned long *)arg; struct page *page; - online_mem_sections(start_pfn, start_pfn + nr_pages); - if (PageReserved(pfn_to_page(start_pfn))) for (i = 0; i < nr_pages; i++) { page = pfn_to_page(start_pfn + i); @@ -942,6 +940,9 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages, (*online_page_callback)(page); onlined_pages++; } + + online_mem_sections(start_pfn, start_pfn + nr_pages); + *(unsigned long *)arg = onlined_pages; return 0; } |