]> git.proxmox.com Git - mirror_lxc.git/commit
criu: add feature check capability
authorAdrian Reber <areber@redhat.com>
Wed, 13 Dec 2017 11:04:02 +0000 (12:04 +0100)
committerAdrian Reber <areber@redhat.com>
Thu, 14 Dec 2017 19:34:51 +0000 (20:34 +0100)
commitb5b12b9e75935836213b7637d018c93763183945
treeb972040189df32cdbeeb8f20d87d47027feb4dd0
parentf449521ce675ba1b5c9a8a8ffc559016844dcec6
criu: add feature check capability

For migration optimization features like pre-copy or post-copy migration
the support cannot be determined by simply looking at the CRIU version.
Features like that depend on the architecture/kernel/criu combination
and CRIU offers a feature checking interface to query if it is
supported.

This adds a LXC interface to query CRIU for those feature via the
migrate() API call. For the recent pre-copy migration support in LXD
this can be used to automatically detect if pre-copy migration should be
used.

In addition to the existing migrate() API commands this adds a new
command: 'MIGRATE_FEATURE_CHECK'.

The migrate_opts{} structure is extended by the member features_to_check
which is a bitmask defining which CRIU features should be queried.

Currently only the querying of the features FEATURE_MEM_TRACK and
FEATURE_LAZY_PAGES is supported.

Signed-off-by: Adrian Reber <areber@redhat.com>
src/lxc/criu.c
src/lxc/criu.h
src/lxc/lxccontainer.c
src/lxc/lxccontainer.h