From: David Hildenbrand <david@redhat.com>
To: lirongqing <lirongqing@baidu.com>,
muchun.song@linux.dev, osalvador@suse.de,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, giorgitchankvetadze1997@gmail.com
Subject: Re: [PATCH][v4] mm/hugetlb: retry to allocate for early boot hugepage allocation
Date: Mon, 1 Sep 2025 12:10:49 +0200 [thread overview]
Message-ID: <9a85a903-ac8d-4198-a8d4-01d70f23b443@redhat.com> (raw)
In-Reply-To: <20250901082052.3247-1-lirongqing@baidu.com>
On 01.09.25 10:20, lirongqing wrote:
> From: Li RongQing <lirongqing@baidu.com>
>
> In cloud environments with massive hugepage reservations (95%+ of system
> RAM), single-attempt allocation during early boot often fails due to
> memory pressure.
>
> Commit 91f386bf0772 ("hugetlb: batch freeing of vmemmap pages") intensified
> this by deferring page frees, increase peak memory usage during allocation.
>
> Introduce a retry mechanism that leverages vmemmap optimization reclaim
> (~1.6% memory) when available. Upon initial allocation failure, the system
> retries until successful or no further progress is made, ensuring reliable
> hugepage allocation while preserving batched vmemmap freeing benefits.
>
> Testing on a 256G machine allocating 252G of hugepages:
> Before: 128056/129024 hugepages allocated
> After: Successfully allocated all 129024 hugepages
>
> Suggested-by: David Hildenbrand <david@redhat.com>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
> ---
Thanks! BTW, it's interesting to see such extreme hugetlb allocation on
machines :)
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers
David / dhildenb
prev parent reply other threads:[~2025-09-01 10:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 8:20 [PATCH][v4] mm/hugetlb: retry to allocate for early boot hugepage allocation lirongqing
2025-09-01 10:10 ` David Hildenbrand [this message]
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=9a85a903-ac8d-4198-a8d4-01d70f23b443@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=giorgitchankvetadze1997@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lirongqing@baidu.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).