]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries/memory-hotplug: Only update DT once per memory DLPAR request
authorNathan Fontenot <nfont@linux.vnet.ibm.com>
Fri, 20 Apr 2018 20:29:48 +0000 (15:29 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 19 Sep 2018 12:08:12 +0000 (22:08 +1000)
commit4bb0af9cfe0a4bcbfe97c275965a96fc7858daf4
tree4a58f214d747e4be12e1a51f0f349b2848b04310
parent5880e8df621087fec2c99fb03960f54cb109cd35
powerpc/pseries/memory-hotplug: Only update DT once per memory DLPAR request

The updates to powerpc numa and memory hotplug code now use the
in-kernel LMB array instead of the device tree. This change allows the
pseries memory DLPAR code to only update the device tree once after
successfully handling a DLPAR request.

Prior to the in-kernel LMB array, the numa code looked up the affinity
for memory being added in the device tree, the code now looks this up
in the LMB array. This change means the memory hotplug code can just
update the affinity for an LMB in the LMB array instead of updating
the device tree.

This also provides a savings in kernel memory. When updating the
device tree old properties are never free'ed since there is no
usecount on properties. This behavior leads to a new copy of the
property being allocated every time a LMB is added or removed (i.e. a
request to add 100 LMBs creates 100 new copies of the property). With
this update only a single new property is created when a DLPAR request
completes successfully.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/drmem.h
arch/powerpc/platforms/pseries/hotplug-memory.c