From: Mike Rapoport <rppt@kernel.org>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Oscar Salvador <osalvador@suse.de>,
Muchun Song <muchun.song@linux.dev>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Chris Mason <mason@kernel.org>
Subject: Re: [PATCH] mm/mm_init: don't subtract managed CMA pages twice
Date: Thu, 19 Nov 2026 13:39:21 +0200 [thread overview]
Message-ID: <av7f6WK8zipAigbg@kernel.org> (raw)
In-Reply-To: <20261119-cma_managed-v1-1-385751505e24@kernel.org>
On Thu, Nov 19, 2026 at 12:19:06PM +0100, David Hildenbrand (Arm) wrote:
> From: Chris Mason <mason@kernel.org>
>
> 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,
when applying?
> so we end up subtracting them twice.
>
> Fix it by only subtracting CMA pages that are not managed yet.
>
> This has very low urgency, as it only affects a boot message.
Agree :)
> Fixes: b1b7c045e808 ("mm/hugetlb: initialize gigantic bootmem hugepage struct pages earlier")
> Signed-off-by: Chris Mason <mason@kernel.org>
> [ david: improve description and comment ]
> Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
> ---
> This should go through the memblock tree.
> ---
> mm/mm_init.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-11-19 11:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 11:19 [PATCH] mm/mm_init: don't subtract managed CMA pages twice David Hildenbrand (Arm)
2026-11-19 11:33 ` Muchun Song
2026-11-19 11:39 ` Mike Rapoport [this message]
2026-11-19 11:51 ` David Hildenbrand (Arm)
2026-11-19 13:02 ` Mike Rapoport
2026-11-19 13:04 ` Oscar Salvador (SUSE)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=av7f6WK8zipAigbg@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mason@kernel.org \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.