Re: [PATCH v4] mm: fix accounting of memmap pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 07, 2025 at 08:35:45PM +0200, Sumanth Korikkar wrote:
>For !CONFIG_SPARSEMEM_VMEMMAP, memmap page accounting is currently done
>upfront in sparse_buffer_init(). However, sparse_buffer_alloc() may
>return NULL in failure scenario.
>
>Also, memmap pages may be allocated either from the memblock allocator
>during early boot or from the buddy allocator. When removed via
>arch_remove_memory(), accounting of memmap pages must reflect the
>original allocation source.
>
>To ensure correctness:
>* Account memmap pages after successful allocation in sparse_init_nid()
>  and section_activate().
>* Account memmap pages in section_deactivate() based on allocation
>  source.
>
>Cc: stable@xxxxxxxxxxxxxxx
>Fixes: 15995a352474 ("mm: report per-page metadata information")
>Suggested-by: David Hildenbrand <david@xxxxxxxxxx>
>Signed-off-by: Sumanth Korikkar <sumanthk@xxxxxxxxxxxxx>

LGTM

Reviewed-by: Wei Yang <richard.weiyang@xxxxxxxxx>

-- 
Wei Yang
Help you, Help me




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux