Re: [PATCH v3 0/4] Fix HugeTLB subpool used_hpages tracking
From: Joshua Hahn
Date: Thu Sep 17 2026 - 18:06:04 EST
On Wed, 16 Sep 2026 20:13:07 -0700 Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 16 Sep 2026 16:39:00 -0700 Ackerley Tng via B4 Relay <devnull+ackerleytng.google.com@xxxxxxxxxx> wrote:
>
> > HugeTLB subpools currently only track used pages (used_hpages) when a
> > maximum size limit (max_hpages) is configured on the mount.
> >
> > ...
> >
> > This series addresses three problem areas resulting from untracked usage
> > and asymmetric error handling:
>
> These are rather serious-sounding problems.
>
> I'm seeing Fixes: for 10-year-old patches, for one last year and one
> this year. The fourth patch doesn't identify what to fix.
>
> So if downstream people (-stable maintainers, others) follow our
> recommendations, some kernels will get two of these patches, other
> kernel versions will get three and some lucky kernels might get all
> four. Are you confident that the patches can be split apart in this
> fashion and still produce a good result? After all, we're sending
> downstream some patch combinations which we didn't test.
>
> Also, can you speculate about why these things took so long to
> discover?
Hi Andrew,
I'll be brave and admit that I knew there were hugetlb accounting issues
for a while because I was seeing them at some ~rare~ frequency, but
I couldn't figure out exactly what was happening and didn't report it.
In my defense this was before LLMs were doing a good job of finding
bugs in code ; -)
So I'm very grateful that Ackerley took the time to find what was
happening and sent the fixes.
> Ho hum, complicated. Let's at least slap a Fixes: on [4/4]. My
> trillion-dollar sidekick suggests a9e443086489 ("hugetlb: disable
> region_add file_region coalescing").
I just reviewed the 4th part, I'm not sure if there are any
userspace-visible changes for this. Maybe just an additional retry for
allocating from the global subpool?
> Our other little friend is talking to us:
> https://sashiko.dev/#/patchset/20260916-hugetlb-subpool-always-track-used-v3-0-38aae9b5ccdd@xxxxxxxxxx
>
> I'd like to queue this up promptly because it fixes things. But let's
> seek additional review input and argue with Sashiko before taking that
> step.
Agreed, I left my reviewed tag on 2 & 3 but it seems like Sashiko is
raising some concerns. Ackerley, any thoughts on those?
Thank you as always, Andrew!
Joshua