[Devel] [PATCH rh7] ve: Add interface for @start_timespec and @real_start_timespec adjustmen

Cyrill Gorcunov gorcunov at virtuozzo.com
Tue Feb 9 03:25:22 PST 2016


On Tue, Feb 09, 2016 at 02:14:25PM +0300, Vladimir Davydov wrote:
> > 
> > It was named so in pcs6, so I tried to preserve naming. But sure I
> > can rename, that's not a problem.
> 
> I mean not ve_struct.start_timespec - its name is perfectly fine - but
> the cgroup file ve.start_timespec - with your patch it should rather be
> called ve.clock_monotonic.

Fine by me. Will update.

> > Vladimir, maybe I misunderstand you, could you please provide
> > the pseudocode how you imagine it could work? I mean without
> > in-kernel time normalization. I suspect I miss something obvious.
> 
> Before suspending a container, you call clock_gettime for
> CLOCK_MONOTONIC on the host, then read ve.start_timespec, then save the
> difference to the image. On restore you read CLOCK_MONOTONIC on the
> destination host and write (clock - difference) to ve.start_timepsec.
> This would require more work from userspace though.

And that's the problem. Currently we simply read this members
from cgroup via libvzctl script, and write them back on the
restore via script as well (and save the values itself inside
libvzctl specific files because I don't want to bring some
non-generic functionality into CRIU). In future (hopefully
not that long) we will implement that named 'custom cgroup
properties' engine in CRIU and we simply pass the cgroup
file names into CRIU options so c/r will be done
automatically.

If we have to do _additional_ computation inside CRIU
I fear this gonna be a way less convenient. So personally
I would prefer the current scheme instead.

	Cyrill


More information about the Devel mailing list