lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ee0bbcde-612b-4a53-aa2a-bc3f60302408@kernel.org>
Date: Mon, 12 Jan 2026 20:52:12 +0100
From: "David Hildenbrand (Red Hat)" <david@...nel.org>
To: Li Zhe <lizhe.67@...edance.com>, muchun.song@...ux.dev
Cc: akpm@...ux-foundation.org, fvdl@...gle.com, linux-kernel@...r.kernel.org,
 linux-mm@...ck.org, osalvador@...e.de, mjguzik@...il.com, mhocko@...e.com,
 joao.m.martins@...cle.com, ankur.a.arora@...cle.com, raghavendra.kt@....com
Subject: Re: [PATCH v2 0/8] Introduce a huge-page pre-zeroing mechanism

> As for concern (4), I believe it is orthogonal to this patchset, and
> the cover letter already contains a performance comparison that
> demonstrates the additional benefit.
> 
>> I did see some comments in [1] about QEMU supporting user-mode
>> parallel zero-page operations; I’m just not sure what the current
>> state of that support looks like, or what the corresponding benchmark
>> numbers are.
> 
> As noted above, QEMU already employs a parallel page-touch mechanism,
> yet the elapsed time remains noticeable. I am not deeply familiar with
> QEMU; please correct me if I am mistaken.

I implemented some part of the parallel preallocation support in QEMU.

With QEMU, you can specify the number of threads and even specify the 
NUMA-placement of these threads. So you can pretty much fine-tune that 
for an environment.

You still pre-zero all hugetlb pages at VM startup time, just in 
parallel though. So you pay some price at APP startup time.

If you know that you will run such a VM (or something else) later, you 
could pre-zero the memory from user space by using a hugetlb-backed file 
and supplying that to QEMU as memory backend for the VM. Then, you can 
start your VM without any pre-zeroing.

I guess that approach should work universally. Of course, there are 
limitations, as you would have to know how much memory an app needs, and 
have a way to supply that memory in form of a file to that app.

-- 
Cheers

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ