[CRIU] [PATCH 2/8] stats: save uptime to know when dump had happened
Dmitry Safonov
0x7f454c46 at gmail.com
Fri Feb 9 19:34:28 MSK 2018
2018-02-09 16:06 GMT+00:00 Pavel Tikhomirov <ptikhomirov at virtuozzo.com>:
> We want to use a simple fact: If we have an alive process in a pstree we
> want to dump, and a starttime of that process is less than pre-dump's
> timestamp, then these exact process existed (100% sure) at the time of
> these pre-dump and the process' memory was dumped in images. Thus we
> save uptime while in freezed state else these won't work.
>
> https://jira.sw.ru/browse/PSBM-67502
>
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
> ---
> criu/cr-dump.c | 4 ++++
> criu/include/stats.h | 2 ++
> criu/proc_parse.c | 2 +-
> criu/stats.c | 22 ++++++++++++++++++++++
> images/stats.proto | 2 ++
> 5 files changed, 31 insertions(+), 1 deletion(-)
The commit message doesn't answer, why we need uptime at all.
ITOW, why checking of start_time from procfs you use to compare
with uptime can't be used to check if process is the same:
pre-dump-1's start_time == pre-dump-2's start_time
I'm not against, just wonder why we need additionally save uptime in
image files to what we already have..
--
Dmitry
More information about the CRIU
mailing list