criu/lib/c
Dan Feigin 97a87b82df criu: add --image-io-mode option to gate O_DIRECT reads of the pages image
Since #3022 restore reads the pages image with O_DIRECT unconditionally. That
helps a cold or cross-host restore, but on a same-host restore it bypasses the
still-warm cache and reads from disk, which made maps04 much slower (#3053).

Add an --image-io-mode option to select the pages-image I/O method: writeback
(default) keeps the buffered behaviour, direct uses O_DIRECT. It applies to both
dump and restore and can be set on the command line or over RPC.

Gate the restore side at the probe's call sites: open_page_read_at() and the
restore vma-io builder in mem.c switch the pages fd to O_DIRECT only when direct
mode was requested, so writeback keeps reading through the host page cache. The
probe itself no longer inspects the mode; as it now runs only on an explicit
request, its buffered-fallback log becomes a warning. The dump side follows in
the next commit.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Dan Feigin <dfeigin@nvidia.com>
2026-07-08 09:52:16 +01:00
..
criu.c criu: add --image-io-mode option to gate O_DIRECT reads of the pages image 2026-07-08 09:52:16 +01:00
criu.h criu: add --image-io-mode option to gate O_DIRECT reads of the pages image 2026-07-08 09:52:16 +01:00
criu.pc.in build: Move C and Python libraries into lib 2016-02-15 15:32:39 +03:00
Makefile compel: no -r for ARM ldflags 2017-04-02 18:12:10 +03:00