Skip to content

perf(tfork): scope pre-fork writeback to the source filesystem - #8

Open
yiying-zhang wants to merge 64 commits into
mainfrom
perf/tfork-source-sync
Open

perf(tfork): scope pre-fork writeback to the source filesystem#8
yiying-zhang wants to merge 64 commits into
mainfrom
perf/tfork-source-sync

Conversation

@yiying-zhang

Copy link
Copy Markdown
Collaborator

Summary

  • replace host-wide sync with syncfs on the source container rootfs;
  • preserve a compatibility global mode and an experimental none mode;
  • make the selected durability boundary explicit through
    PODMAN_TFORK_SYNC_MODE=syncfs|global|none;
  • add dirty buffered-write, shared-mmap, rename, sparse-file, and isolation
    coverage.

Why

The old global barrier runs while the source is frozen and can flush unrelated
filesystems and workloads. syncfs preserves filesystem-wide writeback for the
source backing filesystem without paying for every filesystem on the host.

Performance

Ten interleaved real-Webtop pairs measured:

Mode Wall median Mean
host-wide sync 1.535 s 1.557 s
source syncfs 0.850 s 0.848 s
saving 0.685 s 0.709 s

CRIU latency was unchanged, confirming that this removes outer filesystem
writeback rather than snapshot work.

Correctness and durability

All 30 synthetic forks passed across global, syncfs, and no-sync modes. The
matrix covered 64 MiB buffered dirties, MAP_SHARED dirties without msync,
rename, a 1-GiB sparse file, inheritance, and child/source isolation.

syncfs still flushes the complete filesystem, not only the rootfs directory.
Sources using multiple independent mounts require one barrier per participating
filesystem. The no-sync mode is not a durable production default. A disposable
VM power-cut test remains the final crash-durability gate.

yiying-zhang and others added 30 commits July 10, 2026 23:44
Stabilize live tfork source freezing
yiying-zhang and others added 30 commits July 18, 2026 08:39
…-main

Stabilize single-copy tfork clone path
Rewrite tclone setup for Gensee Crate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants