Re: [PATCH] mm/mm_init: don't subtract managed CMA pages twice

From: David Hildenbrand (Arm)

Date: Thu Nov 19 2026 - 06:51:33 EST


On 11/19/26 12:39, Mike Rapoport wrote:
> On Thu, Nov 19, 2026 at 12:19:06PM +0100, David Hildenbrand (Arm) wrote:
>> From: Chris Mason <mason@xxxxxxxxxx>
>>
>> With hugetlb_cma_only, the "reserved" value in the "Memory:" boot message
>> can be wrong (small or underflowed).
>>
>> When mem_init_print_info() calculates the reserved memory, it assumes that
>> no CMA pages are managed yet. However, some CMA pages from hugetlb might
>> already be managed at that point,
>
> How about I change it to
>
> However, hugetlb may have already initialized its bootmem CMA areas,

sure, why not. Thanks!

--
Cheers,

David