Changes

1,254 bytes added ,  10:41, 24 June 2021
Created page with "Pidfd store increases the reliability of pid reuse detection during pre-dumps/dumps using task pidfd instead of task creation time. It is only supported for RPC and the C lib..."
Pidfd store increases the reliability of pid reuse detection during pre-dumps/dumps using task pidfd instead of task creation time.

It is only supported for RPC and the C library.

== Usage ==

A connectionless unix socket is passed to CRIU during each pre-dump/dump through
the RPC option <code>pidfd_store_sk</code> or <code>criu_set_pidfd_store_sk</code> routine in the the library.

<b>NOTE</b>: This is targeted at migration tools like P.Haul, because the passed socket must be kept alive throughout all pre-dump/dump iterations.

== Feature check ==

This feature requires <code>pidfd_open</code> and <code>pidfd_getfd</code> syscalls.
Support could be checked with:
: CLI: <code>criu check --feature pidfd_store</code>.
: RPC: <code>CRIU_REQ_TYPE__FEATURE_CHECK</code> and set <code>pidfd_store</code> to true in the "features" field of the request

== How it works ==

The <code>pidfd_store_sk</code> is used as a queue for task pidfds. CRIU sends tasks pidfds to this socket and receives them in the next pre-dump/dump iteration. Those pidfds could then be used to check whether the task is still alive, otherwise it is a case of pid reuse and CRIU should make a full page dump.

[[Category:P.Haul]]
[[Category:Under the hood]]
[[Category:API]]
9

edits