[RFC 0/2] Introduce a page_fault ioengine for MM workflows

Nico Pache <[email protected]> Thu, 29 Jan 2026 11:42:59 -0700
Newsgroups org.kernel.vger.fio
Message-ID <[email protected]>
This series introduces a new page_fault ioengine and a follow‑up option
to make khugepaged behavior more deterministic for page fault testing.

The first patch adds an mmap‑backed ioengine that allocates anonymous
memory and copies data on read/write to intentionally trigger faults.
This enables using fio’s existing framework and job files for memory
management style workloads without relying on a filesystem. An example
job file is included to demonstrate usage.

The second patch adds a hugepage_delay option to the new engine. It
initially maps memory with MADV_NOHUGEPAGE, then (after a configurable
delay) switches to MADV_HUGEPAGE via a helper thread. This makes
khugepaged candidates reproducible, allows for easier khugepaged testing
and improves repeatability for page_fault tests.

Signed-off-by: Nico Pache <[email protected]>

Nico Pache (2):
  page_fault: add mmap-backed ioengine for anonymous faults
  page_fault: add hugepage_delay option for delayed MADV_HUGEPAGE

 Makefile                |   2 +-
 cconv.c                 |   3 +
 engines/page_fault.c    | 185 ++++++++++++++++++++++++++++++++++++++++
 examples/page_fault.fio |   9 ++
 options.c               |  10 +++
 thread_options.h        |   3 +
 6 files changed, 211 insertions(+), 1 deletion(-)
 create mode 100644 engines/page_fault.c
 create mode 100644 examples/page_fault.fio

-- 
2.52.0