[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251229123407.7669-1-lizhe.67@bytedance.com>
Date: Mon, 29 Dec 2025 20:34:07 +0800
From: "Li Zhe" <lizhe.67@...edance.com>
To: <akpm@...ux-foundation.org>
Cc: <ankur.a.arora@...cle.com>, <david@...nel.org>, <fvdl@...gle.com>,
<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<lizhe.67@...edance.com>, <muchun.song@...ux.dev>, <osalvador@...e.de>
Subject: Re: [PATCH 0/8] Introduce a huge-page pre-zeroing mechanism
On Sun, 28 Dec 2025 13:44:54 -0800, akpm@...ux-foundation.org wrote:
> > Fresh hugetlb pages are zeroed out when they are faulted in,
> > just like with all other page types. This can take up a good
> > amount of time for larger page sizes (e.g. around 40
> > milliseconds for a 1G page on a recent AMD-based system).
> >
> > This normally isn't a problem, since hugetlb pages are typically
> > mapped by the application for a long time, and the initial
> > delay when touching them isn't much of an issue.
> >
> > However, there are some use cases where a large number of hugetlb
> > pages are touched when an application (such as a VM backed by these
> > pages) starts. For 256 1G pages and 40ms per page, this would take
> > 10 seconds, a noticeable delay.
>
> Ankur's contiguous page clearing work
> (https://lkml.kernel.org/r/20251215204922.475324-1-ankur.a.arora@oracle.com)
> will hopefully result in significant changes to the timing observations
> in your changelogs?
I conducted the experiment on my Skylake machine; below are the 64-GiB
huge-page fault latencies measured with 1-GiB page size.
Without Ankur's optimization:
Total time: 15.989429 seconds
Avg time per 1GB page: 0.249835 seconds
With Ankur's optimization:
Total time: 12.931696 seconds
Avg time per 1GB page: 0.202058 seconds
For comparison, when the same 64 GiB of memory was pre-zeroed in
advance by the pre-zeroing mechanism, the test completed in negligible
time.
I will incorporate these findings into the V2 description.
Thanks,
Zhe
Powered by blists - more mailing lists