mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-03 07:45:17 +00:00
lazy-pages: enable lazy-pages via RPC
To use lazy-pages from runc '--lazy-pages' functionality needs to be accessible via RPC. This enables lazy-pages via RPC. The information on which port to listen is taken from the criu_page_server_info protobuf structure. If the user has enabled lazy-pages via RPC only criu_page_server_info.port is evaluated to get the listen port. With additional patches in runc is it possible to use lazy-restore with 'runc checkpoint' and 'runc restore'. travis-ci: success for lazy-pages: enable lazy-pages via RPC Signed-off-by: Adrian Reber <areber@redhat.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
39f1388b4f
commit
6f82f87a44
@@ -371,16 +371,23 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
|
|||||||
opts.exec_cmd[req->n_exec_cmd] = NULL;
|
opts.exec_cmd[req->n_exec_cmd] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (req->has_lazy_pages) {
|
||||||
|
opts.lazy_pages = req->lazy_pages;
|
||||||
|
}
|
||||||
|
|
||||||
if (req->ps) {
|
if (req->ps) {
|
||||||
opts.use_page_server = true;
|
|
||||||
opts.addr = req->ps->address;
|
|
||||||
opts.port = htons((short)req->ps->port);
|
opts.port = htons((short)req->ps->port);
|
||||||
|
|
||||||
if (req->ps->has_fd) {
|
if (!opts.lazy_pages) {
|
||||||
if (!opts.swrk_restore)
|
opts.use_page_server = true;
|
||||||
goto err;
|
opts.addr = req->ps->address;
|
||||||
|
|
||||||
opts.ps_socket = req->ps->fd;
|
if (req->ps->has_fd) {
|
||||||
|
if (!opts.swrk_restore)
|
||||||
|
goto err;
|
||||||
|
|
||||||
|
opts.ps_socket = req->ps->fd;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -108,6 +108,7 @@ message criu_opts {
|
|||||||
optional uint32 timeout = 45;
|
optional uint32 timeout = 45;
|
||||||
optional bool tcp_skip_in_flight = 46;
|
optional bool tcp_skip_in_flight = 46;
|
||||||
optional bool weak_sysctls = 47;
|
optional bool weak_sysctls = 47;
|
||||||
|
optional bool lazy_pages = 48;
|
||||||
optional int32 status_fd = 49;
|
optional int32 status_fd = 49;
|
||||||
optional bool orphan_pts_master = 50;
|
optional bool orphan_pts_master = 50;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user