Re: [PATCH 0/3] powerpc/pseries: Manage single copy of ibm, dynamic-memory

2017-02-01 Thread Michael Ellerman
Nathan Fontenot  writes:

> The ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory property
> of the device-tree can be fairly big on systems with a large amount
> of memory. A system with 1 TB of memory (256 MB LMBs) the property
> size is 94k, this equates to roughly a 30MB property size for a 32 TB
> system. This file size is not neccessarily huge, but the need to update
> this property every time we DLPAR add or remove an LMB could be
> problematic.
>
> Every time the property is updated a new copy of the property is made
> with the previous copy being added to the old_properties list. Due to
> the lack of reference counting on properties old versions of a property
> are never free'ed. One a large 32TB system we could easilty do
> several thousands of memory add/remove operations and thus create
> several thousand of copies of this property. This seems a bit wasteful
> with respect to system resources.
> 
> Patch 1/3:
> This patch changes the pseries hotplug memory code to maintain a static
> reference to this property instead of creating a new copy for every LMB
> that we add or remove. In doing this we have to ensure that the property
> remains in BE format so a set of accessor methods are provided to
> get/set values from the property in the proper cpu format.

I missed this when you sent it, and now it doesn't apply anymore. Can
you do a rebase and resend it ?

cheers


[PATCH 0/3] powerpc/pseries: Manage single copy of ibm, dynamic-memory

2016-08-26 Thread Nathan Fontenot
The ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory property
of the device-tree can be fairly big on systems with a large amount
of memory. A system with 1 TB of memory (256 MB LMBs) the property
size is 94k, this equates to roughly a 30MB property size for a 32 TB
system. This file size is not neccessarily huge, but the need to update
this property every time we DLPAR add or remove an LMB could be
problematic.

Every time the property is updated a new copy of the property is made
with the previous copy being added to the old_properties list. Due to
the lack of reference counting on properties old versions of a property
are never free'ed. One a large 32TB system we could easilty do
several thousands of memory add/remove operations and thus create
several thousand of copies of this property. This seems a bit wasteful
with respect to system resources.

Patch 1/3:
This patch changes the pseries hotplug memory code to maintain a static
reference to this property instead of creating a new copy for every LMB
that we add or remove. In doing this we have to ensure that the property
remains in BE format so a set of accessor methods are provided to
get/set values from the property in the proper cpu format.

Patch 2/3:
Remove a no longer need rtas_hp_event flag.

Patch 3/3:
Add a bit field to track updated LMBs during DLPAR add/remove operations.
 
This should provide an improvement in kernel resources as
we will no longer have un-referenced copies of this property.

-Nathan
---

Nathan Fontenot (3):
  powerpc/pseries: maintain single copy of ibm,dynamic-memory property
  powerpc/pseries: Remove no longer needed rtas_hp_event flag
  powerpc/pseries: Add bitmap to track updated LMBs


 arch/powerpc/platforms/pseries/hotplug-memory.c |  526 ++-
 1 file changed, 224 insertions(+), 302 deletions(-)