Re: Memory hotplug failed to offline on bare metal system of multiple nodes

Michal Hocko
2018-11-01T09:22:16Z

On Thu 01-11-18 17:10:55, Baoquan He wrote:
> Hi,
>
> A hot removal failure was met on one bare metal system with 8 nodes, and
> node1~7 are all hotpluggable and 'movable_node' is set. When try to check
> value of /sys/devices/system/node/node1/memory*/removable, found some of
> them are 0, namely un-removable. And a back trace will always be seen. After
> bisecting, it points at criminal commit:
>
> 15c30bc09085 ("mm, memory_hotplug: make has_unmovable_pages more robust")
>
> Reverting it fix the failure, and node1~7 can be hot removed and hot
> added again. From the log of commit 15c30bc09085, it's to fix a
> movable_core setting issue which we allocated node_data firstly in
> initmem_init(), then try to mark it as movable in mm_init(). We may need
> think about it further to fix it, meanwhile not breaking bare metal
> system.
>
> I haven't figured out why the above commit caused those memmory
> block in MOVABL zone being not removable. Still checking. Attach the
> tested reverting patch in this mail.

Could you check which of the test inside has_unmovable_pages claimed the
failure? Going back to marking movable_zone as guaranteed to offline is
just too fragile.
--
Michal Hocko
SUSE Labs