Re: [PATCH 0/6] mm: make movable onlining suck less

From: Reza Arbab
Date: Wed Apr 05 2017 - 11:27:07 EST


On Wed, Apr 05, 2017 at 03:52:49PM +0200, Michal Hocko wrote:
My code doesn't do that though. So I guess I have to sanitize. Does this help? Please drop the "mm, memory_hotplug: get rid of zone/node
shrinking" patch.
---
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index acf2b5eb5ecb..2c5613d19eb6 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -750,6 +750,15 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
int ret;
struct memory_notify arg;

+ do {
+ if (pfn_valid(pfn))
+ break;
+ pfn++;
+ } while (--nr_pages > 0);
+
+ if (!nr_pages)
+ return -EINVAL;
+
nid = pfn_to_nid(pfn);
if (!allow_online_pfn_range(nid, pfn, nr_pages, online_type))
return -EINVAL;

Sorry, no change. Back to the oops in find_biggest_section_pfn().

--
Reza Arbab