AsyncZero: Latency Hiding of Page Zeroing in Linux

For security reasons, the OS usually clears memory before giving it to the user. It overwrites any possibly sensitive data with zeros. This is done in the page fault handler, where new 4 KiB or 2 MiB pages are allocated and mapped. Especially for 2 MiB hugepages, the page fault latency highly depends on the zeroing operation, which takes up 94% of this latency. For smaller 4 KiB pages, zeroing takes less time, but is still noticeable with 8.9%.

This thesis focuses on techniques to pre-zero pages or offload page zeroing to DMA devices. The idea is to have a background kernel task that periodically zeros pages for the next allocations. This task can either be triggered when the CPU idles and use CPU resources to zero pages or offload the zero operation to a DMA device, like an SSD.

Topics: Linux, C, Allocator

image


USENIX Conference A Distinguished Artifact Award
LLFree: Scalable and Optionally-Persistent Page-Frame Allocation
Lars Wrenger, Florian Rommel, Alexander Halbuer, Christian Dietrich, Daniel Lohmann2023 USENIX Annual Technical Conference (USENIX '23)USENIX Association2023Distinguished Artifact Award.
PDF Details Slides [BibTex]