On 02/09/2016 02:25 PM, Cyrill Gorcunov wrote: > 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.
For now we can keep a patch in vz-criu spec file for that, can't we? > 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 > . > _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
