A possible cause might be the Bionic commit 483735440add (mm/memory_hotplug: fix online/offline_pages called w.o. mem_hotplug_lock) that was backported from the upstream commit 381eab4a6ee8.
It seems the location of the new call to mem_hotplug_being() was shifted:
-->8--
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 6cd0c4a144d5..7dd8b84ea849 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -891,6 +891,8 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
int ret;
struct memory_notify arg;
+ mem_hotplug_begin();
+
nid = pfn_to_nid(pfn);
/* associate pfn range with the zone */
zone = move_pfn_range(online_type, nid, pfn, nr_pages);
@@ -904,8 +906,6 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
if (ret)
goto failed_addition;
- mem_hotplug_begin();
-
/*
* If this zone is not populated, then it is not in zonelist.
* This means the page allocator ignores this zone.
@@ -1178,9 +1178,7 @@ int __ref add_memory_resource(int nid, struct resource *res, bool online)
walk_memory_range(PFN_DOWN(start), PFN_UP(start + size - 1),
NULL, online_memory_block);
-
return ret;
-
error:
/* rollback pgdat allocation and others */
if (new_pgdat && pgdat)
-->8--
I will build a test kernel with this change to test it.
A possible cause might be the Bionic commit 483735440add (mm/memory_hotplug: fix online/ offline_ pages called w.o. mem_hotplug_lock) that was backported from the upstream commit 381eab4a6ee8.
It seems the location of the new call to mem_hotplug_being() was shifted:
-->8-- hotplug. c b/mm/memory_ hotplug. c .7dd8b84ea849 100644 hotplug. c hotplug. c pages(unsigned long pfn, unsigned long nr_pages, int online_typ
diff --git a/mm/memory_
index 6cd0c4a144d5.
--- a/mm/memory_
+++ b/mm/memory_
@@ -891,6 +891,8 @@ int __ref online_
int ret;
struct memory_notify arg;
+ mem_hotplug_ begin() ; range(online_ type, nid, pfn, nr_pages); pages(unsigned long pfn, unsigned long nr_pages, int online_typ
+
nid = pfn_to_nid(pfn);
/* associate pfn range with the zone */
zone = move_pfn_
@@ -904,8 +906,6 @@ int __ref online_
if (ret)
goto failed_addition;
- mem_hotplug_ begin() ; resource( int nid, struct resource *res, bool online) memory_ range(PFN_ DOWN(start) , PFN_UP(start + size - 1), memory_ block);
-
/*
* If this zone is not populated, then it is not in zonelist.
* This means the page allocator ignores this zone.
@@ -1178,9 +1178,7 @@ int __ref add_memory_
walk_
NULL, online_
-
return ret;
-
error:
/* rollback pgdat allocation and others */
if (new_pgdat && pgdat)
-->8--
I will build a test kernel with this change to test it.