[FIX PATCH v0] powerpc: Fix memory unplug failure on radix guest
Reza Arbab
arbab at linux.vnet.ibm.com
Sat Aug 12 02:28:28 AEST 2017
On Fri, Aug 11, 2017 at 02:07:51PM +0530, Aneesh Kumar K.V wrote:
>Reza Arbab <arbab at linux.vnet.ibm.com> writes:
>
>> On Thu, Aug 10, 2017 at 02:53:48PM +0530, Bharata B Rao wrote:
>>>diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
>>>index f830562..24ecf53 100644
>>>--- a/arch/powerpc/kernel/prom.c
>>>+++ b/arch/powerpc/kernel/prom.c
>>>@@ -524,6 +524,7 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node)
>>> size = 0x80000000ul - base;
>>> }
>>> memblock_add(base, size);
>>>+ memblock_mark_hotplug(base, size);
>>> } while (--rngs);
>>> }
>>> memblock_dump_all();
>>
>> Doing this has the effect of putting all the affected memory into
>> ZONE_MOVABLE. See find_zone_movable_pfns_for_nodes(). This means no
>> kernel allocations can occur there. Is that okay?
>>
>
>So the thinking here is any memory identified via ibm,dynamic-memory can
>be hot removed later. Hence the need to add them lmb size, because our
>hotplug framework remove them in lmb size. If we want to support
>hotunplug, then we will have to make sure kernel allocation doesn't
>happen in that region right ?
Yes, the net result is that this memory can now be hotremoved. I just
wanted to point out that the patch doesn't only change the granularity
of addition--it also causes the memory to end up in a different zone
(when using movable_node).
>With the above i would consider not marking it hotplug was a bug before
>?
Sure, that's reasonable.
--
Reza Arbab
More information about the Linuxppc-dev
mailing list