<div dir="ltr">2013/5/20 Andrew Vagin <span dir="ltr">&lt;<a href="mailto:avagin@parallels.com" target="_blank">avagin@parallels.com</a>&gt;</span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On Mon, May 20, 2013 at 02:24:23AM +0400, Pavel Tikhomirov wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; In this patch I want to add posix timers dump/restore to criu.<br>
&gt;<br>
&gt; In first patch I add little function which can replace timeval_valid,<br>
&gt; because it is not universal enough to take both timeval and timespec.<br>
&gt;<br>
&gt; Second patch stands for syscalls needed to opperate with timers.<br>
&gt;<br>
&gt; In third patch there are parasite function to get time from timers, and<br>
&gt; proc parsing one to parse /proc/&lt;pid&gt;/timers, and structures to save all<br>
&gt; info so also have saving functionality.<br>
&gt;<br>
&gt; In forth patch restore: read info from image, place it in allocated mem<br>
&gt; and remap it in region which will be shared. And when injected, restore<br>
&gt; timers and set them.<br>
&gt;<br>
&gt; problem: don&#39;t have functionality to set overrun when restoring, so it<br>
&gt; won&#39;t pass existing test in zdtm, time displacement fail will occure.<br>
<br>
</div>Which operation fails in this case?</blockquote><div style><br></div><div style>In zdtm/live/static/posix_timers.c in the end of test (64-70 lines) it</div><div style>is checked that time passed on clock is equal to time passed on timer.</div>
<div style>But time on timer is based on overruns which don&#39;t restore good.</div><div style><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">
&gt; (This test multiplies timer interval by overruns.)<br>
<br>
</div>so you should add a new test case to test these patches.<br></blockquote><div><br></div><div style>OK.</div><div style> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div><div class="h5">&gt;<br>
&gt; Thanks, Pavel<br>
&gt;<br>
&gt; Pavel Tikhomirov (4):<br>
&gt;   posix-timer: Add time_valid() function<br>
&gt;   posix-timer: Add proper syscalls definition.<br>
&gt;   posix-timer: Add dump functionality and structures.<br>
&gt;   posix-timer: Add restore functionality and structures.<br>
&gt;<br>
&gt;  arch/x86/syscall-x86-64.def |    5 ++<br>
&gt;  cr-dump.c                   |   13 +++++<br>
&gt;  cr-restore.c                |  126 ++++++++++++++++++++++++++++++++++++++++++-<br>
&gt;  cr-show.c                   |    6 +++<br>
&gt;  image.c                     |    1 +<br>
&gt;  include/crtools.h           |    2 +<br>
&gt;  include/magic.h             |    1 +<br>
&gt;  include/parasite-syscall.h  |    2 +<br>
&gt;  include/parasite.h          |   16 ++++++<br>
&gt;  include/proc_parse.h        |   22 ++++++++<br>
&gt;  include/protobuf.h          |    1 +<br>
&gt;  include/restorer.h          |   21 ++++++++<br>
&gt;  include/syscall-types.h     |    2 +<br>
&gt;  include/util.h              |    8 +++<br>
&gt;  parasite-syscall.c          |   65 ++++++++++++++++++++++<br>
&gt;  pie/parasite.c              |   27 ++++++++++<br>
&gt;  pie/restorer.c              |   35 ++++++++++++<br>
&gt;  proc_parse.c                |  121 +++++++++++++++++++++++++++++++++++++++++<br>
&gt;  protobuf.c                  |    2 +<br>
&gt;  protobuf/Makefile           |    1 +<br>
&gt;  protobuf/posix-timer.proto  |   15 ++++++<br>
&gt;  21 files changed, 490 insertions(+), 2 deletions(-)<br>
&gt;  create mode 100644 protobuf/posix-timer.proto<br>
&gt;<br>
&gt; --<br>
&gt; 1.7.9.5<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; CRIU mailing list<br>
&gt; <a href="mailto:CRIU@openvz.org">CRIU@openvz.org</a><br>
&gt; <a href="https://lists.openvz.org/mailman/listinfo/criu" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
</blockquote></div><br></div></div>