Memory hotplug broken on powerkvm/pseries with CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y

Bharata B Rao bharata.rao at gmail.com
Fri May 19 19:42:03 AEST 2017


Hi,

Memory hotplug for a pseries guest on PowerKVM fails with the following
error when CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y in the guest kernel. (I
am on commit b23afd384801)

[root at localhost ~]#  pseries-hotplug-mem: Attempting to hot-add 4 LMB(s) at
index 80000020
removing memory fails, because memory
[0x0000000200000000-0x000000020fffffff] is onlined
------------[ cut here ]------------
kernel BUG at mm/memory_hotplug.c:2189!
Oops: Exception in kernel mode, sig: 5 [#1]
Call Trace:
remove_memory+0x70/0x100 (unreliable)
dlpar_add_lmb+0x370/0x3f0
dlpar_memory+0x7bc/0xcd0
handle_dlpar_errorlog+0xf8/0x160
pseries_hp_work_fn+0x94/0xa0
process_one_work+0x240/0x510
worker_thread+0x9c/0x550
kthread+0x164/0x1b0
ret_from_kernel_thread+0x5c/0x7c

This failure occurs because the current code results in double onlining as
memhp_auto_online gets set with CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y.

It appears that by reverting commit 943db62c316c5 (powerpc/pseries: Revert
'Auto-online hotplugged memory'), hotplug is working again.

Apparently that commit itself is a revert of other two commits which caused
"the pseries memory DLPAR code to fail when trying to remove an LMB that
was previously removed and added back". However I am able to do hotplug,
unplug, plug and unplug of the same DIMM device (set of LMBs) most of the
times with the above commit (943db62c316c5) reverted. The only occasional
failure to unplug occurs when guest refuses to offline an LMB (with -EBUSY)
possibly because it is in use, which I think is a valid failure.

Nathan - Could you please let me know the exact way to reproduce the
problem that led to this commit (943db62c316c5) ?

Regards,
Bharata.
-- 
http://raobharata.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20170519/4a4735fd/attachment.html>


More information about the Linuxppc-dev mailing list