> On May 12, 2026, at 14:52, Donet Tom <[email protected]> wrote:
> 
> On 5/11/26 4:48 PM, Muchun Song wrote:
> 
>> Rename the memory block lookup helper to make the acquired reference
>> explicit, add memory_block_put() to wrap put_device(), and collapse the
>> redundant section-number wrapper into a single block-id based lookup
>> interface.
>> 
>> This makes it clearer to callers that a successful lookup holds a
>> reference that must be dropped, reducing the chance of forgetting the
>> matching put and leaking the memory block device reference.
>> 
>> Link: 
>> https://lore.kernel.org/linux-mm/[email protected]/#t
>> Signed-off-by: Muchun Song <[email protected]>
>> ---
>>  .../platforms/pseries/hotplug-memory.c        | 14 ++-----
>>  drivers/base/memory.c                         | 38 +++++++------------
>>  drivers/base/node.c                           |  4 +-
>>  drivers/s390/char/sclp_mem.c                  | 17 ++++-----
>>  include/linux/memory.h                        |  7 +++-
>>  mm/memory_hotplug.c                           |  5 +--
>>  6 files changed, 35 insertions(+), 50 deletions(-)
> 
> 
> 
> Hi
> 
> I did some basic DLPAR memory add/remove tests on PowerPC with this patch, 
> and it is working fine.
> 
> Initial memory
> ==============
> []# cat /proc/meminfo |grep -i MemTotal
> MemTotal:       205169920 kB
> 
> After Add
> =========
> []# cat /proc/meminfo |grep -i MemTotal
> MemTotal:       247112960 kB
> 
> After Remove
> ============
> []# cat /proc/meminfo |grep -i MemTotal
> MemTotal:       173729024 kB
> []#
> 
> Tested-by: Donet Tom <[email protected]>


Really thanks for your testing.

Thanks,
Muchun.

Reply via email to