Re: [PATCH] selftests/mm: uffd-missing-wp: add GC related functionality test

From: David Hildenbrand (Arm)

Date: Mon Sep 28 2026 - 05:09:24 EST


On 9/28/26 05:26, Martin Cracauer wrote:
> Add a test that asserts that functionality needed for generational
> garbage collection works. Namely to implement a write barrier using
> userfaultfd instead of using segmentation faults. The planned target
> is the GC in SBCL.
>
> The real GC will initially fill heap pages by using on-demand loading
> of pages from an image file, either via mmap(2) or using userfaultfd
> to decompress a page read from an image file made from individually
> compressed blocks. This test doesn't do that so that it needs no disk
> I/O and no decompression library. Instead, a fault will be filled by
> copying page content from prepared pages in the heap.
>
> Assisted-by: Anthropic:Opus-5.5
> Signed-off-by: Martin Cracauer <cracauer@xxxxxxxx>
> ---
> tools/testing/selftests/mm/Makefile | 1 +
> tools/testing/selftests/mm/uffd-missing-wp.c | 413 +++++++++++++++++++
> 2 files changed, 414 insertions(+)
> create mode 100644 tools/testing/selftests/mm/uffd-missing-wp.c

Isn't something like that a better fit for LTP?

--
Cheers,

David