Re: [PATCH 0/8] Introduce a huge-page pre-zeroing mechanism

From: Li Zhe
Date: Mon Dec 29 2025 - 07:29:37 EST


On Fri, 26 Dec 2025 13:42:13 -0800, fvdl@xxxxxxxxxx wrote:

> Is there any situation where you would write anything else than 'max'
> to the new sysfs file? E.g. in which scenarios does it make sense to
> *not* pre-zero all freed hugetlb folios? There doesn't seem to be a
> point to just doing a certain number. You can't know for sure if the
> number you read will remain correct, as it's just a snapshot. So how
> would you determine a correct number other than 'max'?

My view is that each application knows its own huge-page requirement
and should therefore write the corresponding number into the
"zeroable_hugepages" interface. Since the zeroing work is accounted
to the application process, the CPU time it consumes can be
constrained through that process's cgroup.

Thanks,
Zhe