summaryrefslogtreecommitdiff
path: root/mm/memory_hotplug.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-02-08 10:27:01 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2017-02-08 10:27:01 +1100
commit7b96d11c60a1844fbb6dd91dc97d9044a856d518 (patch)
tree714e5afb9b4c7ead040f1a6e1a46391a689983be /mm/memory_hotplug.c
parent97d11d8fb51ffe27807db971587c5699a902fb25 (diff)
mm: introduce struct mem_section_usage to track partial population of a section
'struct mem_section_usage' combines the existing 'pageblock_flags' bitmap with a new 'map_active' bitmap. The new bitmap enables the memory hot{plug,remove} implementation to act on incremental sub-divisions of a section. The primary impetus for this functionality is to support platforms that mix "System RAM" and "Persistent Memory" within a single section. We want to be able to hotplug "Persistent Memory" to extend a partially populated section and share that section between ZONE_DEVICE and ZONE_NORMAL/MOVABLE memory. This introduces a pointer to the new 'map_active' bitmap through struct mem_section, but otherwise should not change any behavior. Link: http://lkml.kernel.org/r/148486361735.19694.17147399375362860739.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Logan Gunthorpe <logang@deltatee.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Stephen Bates <stephen.bates@microsemi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r--mm/memory_hotplug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 7858d0df2da7..29f7a7ce7a34 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -228,7 +228,7 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
for (i = 0; i < mapsize; i++, page++)
get_page_bootmem(section_nr, page, SECTION_INFO);
- usemap = __nr_to_section(section_nr)->pageblock_flags;
+ usemap = section_to_usemap(__nr_to_section(section_nr));
page = virt_to_page(usemap);
mapsize = PAGE_ALIGN(usemap_size()) >> PAGE_SHIFT;
@@ -254,7 +254,7 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
register_page_bootmem_memmap(section_nr, memmap, PAGES_PER_SECTION);
- usemap = __nr_to_section(section_nr)->pageblock_flags;
+ usemap = section_to_usemap(__nr_to_section(section_nr));
page = virt_to_page(usemap);
mapsize = PAGE_ALIGN(usemap_size()) >> PAGE_SHIFT;