[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEemH2cqZycJ2m1s=UDaCG0XfkaHc57632pbhNaDkV9py+U77g@mail.gmail.com>
Date: Sun, 21 Dec 2025 19:56:01 +0800
From: Li Wang <liwang@...hat.com>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>
Cc: akpm@...ux-foundation.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Mark Brown <broonie@...nel.org>, Shuah Khan <shuah@...nel.org>, Waiman Long <longman@...hat.com>
Subject: Re: [PATCH v2 3/3] selftests/mm/charge_reserved_hugetlb: fix
hugetlbfs mount size for large hugepages
On Sun, Dec 21, 2025 at 5:49 PM David Hildenbrand (Red Hat)
<david@...nel.org> wrote:
>
> On 12/21/25 10:44, Li Wang wrote:
> > David Hildenbrand (Red Hat) <david@...nel.org> wrote:
> >> On 12/21/25 09:58, Li Wang wrote:
> >>> charge_reserved_hugetlb.sh mounts a hugetlbfs instance at /mnt/huge with
> >>> a fixed size of 256M. On systems with large base hugepages (e.g. 512MB),
> >>> this is smaller than a single hugepage, so the hugetlbfs mount ends up
> >>> with effectively zero capacity (often visible as size=0 in mount output).
> >>>
> >>> As a result, write_to_hugetlbfs fails with ENOMEM and the test can hang
> >>> waiting for progress.
> >>
> >> I'm curious, what's the history of using "256MB" in the first place (or
> >> specifying any size?).
> >
> > Seems the script initializes it with "256MB" from:
> >
> > commit 29750f71a9b4cfae57cdddfbd8ca287eddca5503
> > Author: Mina Almasry <almasrymina@...gle.com>
> > Date: Wed Apr 1 21:11:38 2020 -0700
> >
> > hugetlb_cgroup: add hugetlb_cgroup reservation tests
>
> What would happen if we don't specify a size at all?
It still works well, I have gone through the whole file and
there is no subtest that relies on the 256M capability.
So we could just:
mount -t hugetlbfs -o pagesize=${MB}M none /mnt/huge
--
Regards,
Li Wang
Powered by blists - more mailing lists