criu/Documentation/under-the-hood
Andrei Vagin f3b293fd85 docs: Clarify memory consistency and performance in pre-dump documentation
Correct the documentation regarding `vmsplice` and `SPLICE_F_GIFT`
behavior.  `SPLICE_F_GIFT` does not enforce Copy-on-Write (COW) when the
user-space process modifies the gifted memory. Instead, it is a
zero-copy mechanism where post-resume modifications can lead to
inconsistent intermediate dumps.

Explain how CRIU handles this inconsistency via its iterative design,
relying on the soft-dirty tracker to catch post-resume modifications and
re-dump them in subsequent iterations, ensuring final consistency.

Also emphasize that the `splice` scheme relies heavily on `vmsplice`
performance to minimize freeze time, making the migration almost
invisible to the process.

Signed-off-by: Andrei Vagin <avagin@google.com>
2026-06-25 13:16:05 -07:00
..
32bit-tasks-cr.md docs: update 32-bit tasks C/R documentation 2026-06-04 11:29:31 -07:00
aio.md docs: update AIO documentation 2026-06-04 11:29:31 -07:00
apparmor.md docs: update AppArmor documentation 2026-06-04 11:29:31 -07:00
arm64-gcs.md docs: update ARM64 GCS documentation 2026-06-04 11:29:31 -07:00
bpf-maps.md docs: update BPF maps documentation 2026-06-04 11:29:31 -07:00
cgroups.md docs: update CGroups documentation 2026-06-04 11:29:31 -07:00
change-ip-address.md docs: update IP address change documentation 2026-06-04 11:29:31 -07:00
checkpointrestore.md docs: update Checkpoint/Restore architecture documentation 2026-06-04 11:29:31 -07:00
code-blobs.md docs: update Code Blobs documentation 2026-06-04 11:29:31 -07:00
comparison-to-other-cr-projects.md docs: update Comparison to other CR projects documentation 2026-06-04 11:29:31 -07:00
copy-on-write-memory.md docs: update COW memory documentation 2026-06-04 11:29:31 -07:00
dmtcp.md docs: update DMTCP comparison documentation 2026-06-04 11:29:31 -07:00
dumping-files.md docs: update Dumping Files documentation 2026-06-04 11:29:31 -07:00
faq.md docs: update FAQ documentation 2026-06-04 11:29:31 -07:00
fdinfo-engine.md docs: update File Restoration Engine (fdinfo) documentation 2026-06-04 11:29:31 -07:00
filesystems-pecularities.md docs: update Filesystem Peculiarities documentation 2026-06-04 11:29:31 -07:00
final-states.md docs: update Process Tree Final States documentation 2026-06-04 11:29:31 -07:00
freezing-the-tree.md docs: update Freezing the Process Tree documentation 2026-06-04 11:29:31 -07:00
fsnotify.md docs: update FSNotify documentation 2026-06-04 11:29:31 -07:00
how-hard-is-it-to-open-a-file.md docs: update Re-opening Files documentation 2026-06-04 11:29:31 -07:00
how-to-assign-needed-file-descriptor-to-a-file.md docs: update Descriptor Assignment documentation 2026-06-04 11:29:31 -07:00
how-to-open-a-file-without-open-system-call.md docs: update Re-opening Nameless Files documentation 2026-06-04 11:29:31 -07:00
index.md doc: Create index.md for Under the Hood documentation 2026-06-04 11:29:31 -07:00
invisible-files.md docs: update Invisible Files documentation 2026-06-04 11:29:31 -07:00
irmap.md docs: update Irmap documentation 2026-06-04 11:29:31 -07:00
kcmp-trees.md docs: update Kcmp Trees documentation 2026-06-04 11:29:31 -07:00
kerndat.md docs: update Kerndat documentation 2026-06-04 11:29:31 -07:00
mac-vlan.md docs: update Mac-VLAN documentation 2026-06-04 11:29:31 -07:00
memory-changes-tracking.md docs: update Memory Changes Tracking documentation 2026-06-04 11:29:31 -07:00
memory-dumping-and-restoring.md docs: update Memory Dumping and Restoring documentation 2026-06-04 11:29:31 -07:00
memory-images-deduplication.md docs: update Memory Images Deduplication documentation 2026-06-04 11:29:31 -07:00
mount-points.md docs: update Mount Points documentation 2026-06-04 11:29:31 -07:00
mount-points20.md docs: mark Mount Points 2.0 as legacy and redirect to Mount V2 2026-06-04 11:29:31 -07:00
mount-v2.md docs: update Mount V2 documentation 2026-06-04 11:29:31 -07:00
mounts-v2-virtuozzo.md docs: update Mount V2 Detailed Algorithm documentation 2026-06-04 11:29:31 -07:00
nfs-mount-points.md doc: export under-the-hood documentations from criu.org 2026-06-04 11:29:31 -07:00
optimizing-pre-dump-algorithm.md docs: Clarify memory consistency and performance in pre-dump documentation 2026-06-25 13:16:05 -07:00
pagemap-cache.md docs: update Pagemap Cache documentation 2026-06-04 11:29:31 -07:00
parasite-code.md docs: update Parasite Code documentation 2026-06-04 11:29:31 -07:00
pending-signals.md docs: update Pending Signals documentation 2026-06-04 11:29:31 -07:00
pid-restore.md docs: update PID Restoration documentation 2026-06-04 11:29:31 -07:00
pidfd-store.md docs: update Pidfd Store documentation 2026-06-04 11:29:31 -07:00
pidfd.md docs: update Pidfd documentation 2026-06-04 11:29:31 -07:00
README.md docs: add README.md for Under the Hood documentation 2026-06-04 18:58:00 +00:00
restartable-sequences.md docs: update Restartable Sequences documentation 2026-06-04 11:29:31 -07:00
restorer-context.md docs: update Restorer Context documentation 2026-06-04 11:29:31 -07:00
service-descriptors.md docs: update Service Descriptors documentation 2026-06-04 11:29:31 -07:00
shared-memory.md docs: update Shared Memory documentation 2026-06-04 11:29:31 -07:00
sockets.md docs: update Network Sockets documentation 2026-06-04 11:29:31 -07:00
stages-of-restoring.md docs: update Restoration Stages documentation 2026-06-04 11:29:31 -07:00
tcp-connection.md docs: update TCP Connection documentation 2026-06-04 11:29:31 -07:00
technologies.md docs: update Technologies documentation 2026-06-04 11:29:31 -07:00
ttys.md docs: update TTY documentation 2026-06-04 11:29:31 -07:00
tun-tap.md docs: update TUN/TAP documentation 2026-06-04 11:29:31 -07:00
unix-sockets.md docs: update Unix Sockets documentation 2026-06-04 11:29:31 -07:00
userfaultfd.md docs: update Userfaultfd documentation 2026-06-04 11:29:31 -07:00
validate-files-on-restore.md docs: update File Validation documentation 2026-06-04 11:29:31 -07:00
vdso.md docs: update vDSO and VVAR documentation 2026-06-04 11:29:31 -07:00
zombies.md docs: update Zombie Processes documentation 2026-06-04 11:29:31 -07:00

CRIU: Under the Hood

This directory contains technical documentation detailing the internal implementation of CRIU, the kernel APIs it leverages, and the complex algorithms used to achieve checkpoint and restore of various Linux resources.

Core Architecture & Lifecycle

Memory Management

Files, Mounts & I/O

Networking

  • TCP Connections: Using TCP Repair mode for zero-loss socket migration.
  • Unix Sockets: Reconnecting stream and dgram unix sockets.
  • Sockets: General socket restoration (Netlink, Raw, etc.).
  • Change IP Address: Handling network configuration changes during migration.
  • MAC-VLAN: Support for MAC-VLAN interfaces.
  • TUN/TAP: Virtual network device restoration.

Process & Resource Management

  • PID Restore: Algorithms for restoring tasks with specific PIDs.
  • PIDFD: Checkpointing and restoring pidfds.
  • PIDFD Store: Internal management of pidfds.
  • Zombies: Handling processes in the EXIT_ZOMBIE state.
  • 32-bit Tasks C/R: Specifics for IA32/compat mode tasks.
  • Pending Signals: Capturing and re-queuing signals.
  • Restartable Sequences (rseq): Handling the rseq kernel feature.
  • vDSO: Handling the virtual dynamic shared object across kernel versions.
  • TTYs: The complex state of terminal devices and PTY pairs.
  • CGroups: Restoring cgroup hierarchy and membership.

Security & Kernel Features

  • AppArmor: Handling AppArmor profiles during dump and restore.
  • ARM64 GCS: Guarded Control Stack support on AArch64.
  • BPF Maps: Experimental support for checkpointing BPF map data.
  • Code Blobs: Management of PIE blobs (parasite, restorer).

Comparison & External Tools


Generated by Gemini CLI as part of the Documentation Audit (March 2026).