[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251007152429.4c28fb85205635703229b027@linux-foundation.org>
Date: Tue, 7 Oct 2025 15:24:29 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Usama Arif <usamaarif642@...il.com>
Cc: muchun.song@...ux.dev, osalvador@...e.de, david@...hat.com,
linux-mm@...ck.org, hannes@...xchg.org, riel@...riel.com, kas@...nel.org,
linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH] mm/hugetlb: allow overcommitting gigantic hugepages
On Mon, 6 Oct 2025 19:56:07 +0100 Usama Arif <usamaarif642@...il.com> wrote:
> Currently, gigantic hugepages cannot use the overcommit mechanism
> (nr_overcommit_hugepages), forcing users to permanently reserve memory via
> nr_hugepages even when pages might not be actively used.
>
Why did we do that? Just an oversight?
> - if (hstate_is_gigantic(h))
> + if (hstate_is_gigantic(h) && !gigantic_page_runtime_supported())
> - if (hstate_is_gigantic(h))
> + if (hstate_is_gigantic(h) && !gigantic_page_runtime_supported())
> - if (write && hstate_is_gigantic(h))
> + if (write && hstate_is_gigantic(h) && !gigantic_page_runtime_supported())
Maybe a little helper for this?
(Little helpers are nice sites for code comments!)
Powered by blists - more mailing lists