diff for duplicates of <55BA53AF.8050406@citrix.com> diff --git a/a/1.txt b/N1/1.txt index e0fbe70..e7b9348 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -20,3 +20,50 @@ Thanks. Tested-by: David Vrabel <david.vrabel@citrix.com> 8<------------------------------ +>From 0c1acd3118d8bb911566c0af8f759fccbd90fb9e Mon Sep 17 00:00:00 2001 +From: Mel Gorman <mgorman@suse.de> +Date: Thu, 30 Jul 2015 15:45:54 +0100 +Subject: [PATCH] mm: initialize hotplugged pages as reserved + +Commit 92923ca3aacef63c92dc297a75ad0c6dfe4eab37 (mm: meminit: only set +page reserved in the memblock region) breaks memory hotplug because pages +within newly added sections are not marked as reserved as required by +the memory hotplug driver. + +Set hotplugged pages as reserved when adding new zones. + +Tested-by: David Vrabel <david.vrabel@citrix.com> +--- + mm/memory_hotplug.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c +index 460d0fe..169770a 100644 +--- a/mm/memory_hotplug.c ++++ b/mm/memory_hotplug.c +@@ -446,7 +446,7 @@ static int __meminit __add_zone(struct zone *zone, unsigned long phys_start_pfn) + int nr_pages = PAGES_PER_SECTION; + int nid = pgdat->node_id; + int zone_type; +- unsigned long flags; ++ unsigned long flags, pfn; + int ret; + + zone_type = zone - pgdat->node_zones; +@@ -461,6 +461,14 @@ static int __meminit __add_zone(struct zone *zone, unsigned long phys_start_pfn) + pgdat_resize_unlock(zone->zone_pgdat, &flags); + memmap_init_zone(nr_pages, nid, zone_type, + phys_start_pfn, MEMMAP_HOTPLUG); ++ ++ /* online_page_range is called later and expects pages reserved */ ++ for (pfn = phys_start_pfn; pfn < phys_start_pfn + nr_pages; pfn++) { ++ if (!pfn_valid(pfn)) ++ continue; ++ ++ SetPageReserved(pfn_to_page(pfn)); ++ } + return 0; + } + +-- +2.1.4 diff --git a/a/content_digest b/N1/content_digest index 3716721..d217efb 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -4,8 +4,8 @@ "Subject\0Re: [PATCHv1] mm: always initialize pages as reserved to fix memory hotplug\0" "Date\0Thu, 30 Jul 2015 17:41:19 +0100\0" "To\0Mel Gorman <mgorman@suse.de>\0" - "Cc\0linux-kernel@vger.kernel.org" - linux-mm@kvack.org + "Cc\0<linux-kernel@vger.kernel.org>" + <linux-mm@kvack.org> Robin Holt <holt@sgi.com> " Nathan Zimmer <nzimmer@sgi.com>\0" "\00:1\0" @@ -31,6 +31,53 @@ "\n" "Tested-by: David Vrabel <david.vrabel@citrix.com>\n" "\n" - 8<------------------------------ + "8<------------------------------\n" + ">From 0c1acd3118d8bb911566c0af8f759fccbd90fb9e Mon Sep 17 00:00:00 2001\n" + "From: Mel Gorman <mgorman@suse.de>\n" + "Date: Thu, 30 Jul 2015 15:45:54 +0100\n" + "Subject: [PATCH] mm: initialize hotplugged pages as reserved\n" + "\n" + "Commit 92923ca3aacef63c92dc297a75ad0c6dfe4eab37 (mm: meminit: only set\n" + "page reserved in the memblock region) breaks memory hotplug because pages\n" + "within newly added sections are not marked as reserved as required by\n" + "the memory hotplug driver.\n" + "\n" + "Set hotplugged pages as reserved when adding new zones.\n" + "\n" + "Tested-by: David Vrabel <david.vrabel@citrix.com>\n" + "---\n" + " mm/memory_hotplug.c | 10 +++++++++-\n" + " 1 file changed, 9 insertions(+), 1 deletion(-)\n" + "\n" + "diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c\n" + "index 460d0fe..169770a 100644\n" + "--- a/mm/memory_hotplug.c\n" + "+++ b/mm/memory_hotplug.c\n" + "@@ -446,7 +446,7 @@ static int __meminit __add_zone(struct zone *zone, unsigned long phys_start_pfn)\n" + " \tint nr_pages = PAGES_PER_SECTION;\n" + " \tint nid = pgdat->node_id;\n" + " \tint zone_type;\n" + "-\tunsigned long flags;\n" + "+\tunsigned long flags, pfn;\n" + " \tint ret;\n" + " \n" + " \tzone_type = zone - pgdat->node_zones;\n" + "@@ -461,6 +461,14 @@ static int __meminit __add_zone(struct zone *zone, unsigned long phys_start_pfn)\n" + " \tpgdat_resize_unlock(zone->zone_pgdat, &flags);\n" + " \tmemmap_init_zone(nr_pages, nid, zone_type,\n" + " \t\t\t phys_start_pfn, MEMMAP_HOTPLUG);\n" + "+\n" + "+\t/* online_page_range is called later and expects pages reserved */\n" + "+\tfor (pfn = phys_start_pfn; pfn < phys_start_pfn + nr_pages; pfn++) {\n" + "+\t\tif (!pfn_valid(pfn))\n" + "+\t\t\tcontinue;\n" + "+\n" + "+\t\tSetPageReserved(pfn_to_page(pfn));\n" + "+\t}\n" + " \treturn 0;\n" + " }\n" + " \n" + "-- \n" + 2.1.4 -31d66a7d8c27726b39df5c892dc37811545cf1db6d32da0aa75fb018f9340cef +b01d95eb406042192c9275e1d17598f8e6c750115427cb99d519ae12590a0489
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.