'jiffies_begin' is needed to compute relative time-offsets after restart. We cannot use ->ktime_begin for these computations since, as pointed out by John Stultz, converting jiffies to CLOCK_MONOTONIC can result in incorrect values. Signed-off-by: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx> --- include/linux/checkpoint_types.h | 1 + kernel/checkpoint/sys.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/checkpoint_types.h b/include/linux/checkpoint_types.h index 3ffe9bd..aba9380 100644 --- a/include/linux/checkpoint_types.h +++ b/include/linux/checkpoint_types.h @@ -33,6 +33,7 @@ struct ckpt_ctx { int crid; /* unique checkpoint id */ ktime_t ktime_begin; /* checkpoint start time */ + unsigned long jiffies_begin; int root_init; /* [container] root init ? */ pid_t root_pid; /* [container] root pid */ diff --git a/kernel/checkpoint/sys.c b/kernel/checkpoint/sys.c index b761ec0..0beeee5 100644 --- a/kernel/checkpoint/sys.c +++ b/kernel/checkpoint/sys.c @@ -278,6 +278,7 @@ static struct ckpt_ctx *ckpt_ctx_alloc(int fd, unsigned long uflags, ctx->uflags = uflags; ctx->kflags = kflags; ctx->ktime_begin = ktime_get(); + ctx->jiffies_begin = jiffies; ctx->coord_pidns = get_pid_ns(current->nsproxy->pid_ns); atomic_set(&ctx->refcount, 0); -- 1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html