Re: [PATCH v2 0/8] Introduce a huge-page pre-zeroing mechanism
From: David Hildenbrand (Red Hat)
Date: Wed Jan 21 2026 - 07:37:51 EST
On 1/20/26 10:47, David Laight 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).
Can you point me to where was that spelled out as a requirement?
The only real gain has to come from zeroing pages when the system is idle.
That will give plenty of zeroed pages needed for starting a web browser
from the desktop and also speed up single-threaded things like 'make -j1'.
I am strictly against over-engineering any features that hugetlb benefits from only.
--
Cheers
David