Re: [PATCH v2 0/8] Introduce a huge-page pre-zeroing mechanism
From: Li Zhe
Date: Tue Jan 20 2026 - 05:40:22 EST
On Tue, 20 Jan 2026 09:47:44 +0000, david.laight.linux@xxxxxxxxx wrote:
> On Tue, 20 Jan 2026 14:27:06 +0800
> "Li Zhe" <lizhe.67@xxxxxxxxxxxxx> wrote:
>
> > In light of the preceding discussion, we appear to have reached the
> > following understanding:
> >
> > (1) At present we prefer to mitigate slow application startup (e.g.,
> > VM creation) by zeroing huge pages at the moment they are freed
> > (init_on_free). The principal benefit is that user space gains the
> > performance improvement without deploying any additional user space
> > daemon.
>
> Am I missing something?
> If userspace does:
> $ program_a; program_b
> and pages used by program_a are zeroed when it exits you get the delay
> for zeroing all the pages it used before program_b starts.
> OTOH if the zeroing is deferred program_b only needs to zero the pages
> it needs to start (and there may be some lurking).
Under the init_on-free approach, improving the speed of zeroing may
indeed prove necessary.
However, I believe we should first reach consensus on adopting
“init_on_free” as the solution to slow application startup before
turning to performance tuning.
Thanks,
Zhe