[Devel] [PATCH CRIU v5 0/1] dump/restore: Maintain proper start_time param from /proc/[pid]/stat for each task
Valeriy Vdovin
valeriy.vdovin at virtuozzo.com
Tue Feb 4 16:02:45 MSK 2020
This patch addresses the problem of varying views on start time
of a resumed process between container and host. From a container
point of view the resumed process is the same old process with
the same old start time, which hasn't changed after suspend/resume.
>From a host point of view the resumed process is just a new one
with a new start_time. Both the host and the container want to
see start time that is only relevant to their context.
To support that we should teach the output of of /proc/pid/stat
to show container-related value from container context and host-
related value from host context.
The patch introduces new field to task_struct that stores container-
related start time value. It will be seen in /proc/pid/stat in case
if it was requested by a task, that's in ve cgroup.
Setting this field can be done with prctl only from host or a
container task with pseudosuper flag set.
At suspend this value is dumped by criu and at restore it's set back
from a dump by criu.
v5 changes:
- Added field to kerndat struct to check if prctl is supported by kernel
- Don't fail restore if kernel does not support start time fixing.
- Covered minor review comments.
Valeriy Vdovin (1):
dump/restore: Maintain proper start_time param from /proc/[pid]/stat
for each task
criu/cr-dump.c | 60 +++++++++++++++++++++++++++-
criu/cr-restore.c | 104 ++++++++++++++++++++++++++++++++++++------------
criu/include/crtools.h | 25 ++++++++++++
criu/include/kerndat.h | 1 +
criu/include/prctl.h | 10 +++++
criu/include/restorer.h | 9 +++++
criu/kerndat.c | 20 ++++++++++
criu/pie/restorer.c | 25 ++++++++++++
images/core.proto | 1 +
9 files changed, 228 insertions(+), 27 deletions(-)
--
1.8.3.1
More information about the Devel
mailing list