<div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div>Hey Mike,</div><div><br></div><div>Thanks for your reply. I understand what you wrote. However, what I observe is</div><div>that some of the &quot;clean&quot; pages are copied by the CRIU.</div><div><br></div><div>For example, let&#39;s say CRIU performs iterative checkpoints (let&#39;s say using</div><div>predump) on a dumpee process. After one checkpoint is completed, the dumpee</div><div>process calls sbrk to increase the size of the heap. What I observe is that</div><div>even the dumpee program didn&#39;t touch any pages in the heap, all the present</div><div>pages in the heap will be marked as dirty and copied in the next checkpoint</div><div>operation. Is there an explanation for such a behavior? </div><div><br></div><div>Thanks in advance for your help.</div><div><br></div><div>Best,</div><div>Diyu</div></div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 14, 2019 at 9:04 AM Mike Rapoport &lt;<a href="mailto:rppt@linux.ibm.com">rppt@linux.ibm.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, May 13, 2019 at 04:10:54PM -0700, Diyu Zhou wrote:<br>
&gt; Hey, <br>
&gt; <br>
&gt; Firstly, thanks for the great tool! It is very very helpful. I can see the<br>
&gt; development of such a tool <br>
&gt; is very challenging and you guys do several clever tricks to make it possible.<br>
&gt; I enjoy a lot using <br>
&gt; the tool as well as reading the source code and have learned a lot from it. <br>
&gt; <br>
&gt; I have a question regarding the implementation of the soft dirty pages. From<br>
&gt; what I can tell, if <br>
&gt; a VMA is expanded, all the pages within it will be marked as soft dirty. This<br>
&gt; seems to me will <br>
&gt; result in unnecessarily transferring clean pages when iterative dumps are<br>
&gt; performed. <br>
&gt; Is there any reason not just mark the pages in the expanded part of the VMA<br>
&gt; soft dirty? <br>
<br>
When a VMA is expanded is is marked soft-dirty to ensure it would be<br>
scanned for the dirty pages.<br>
Each page has its own marking that says whether the page is dirty or not.<br>
The per-page information is available at /proc/PID/pagemap and CRIU uses it<br>
to actually decide what page should be dumped.<br>
<br>
&gt; Thanks again for the wonderful tool and your help! <br>
&gt; <br>
&gt; Best,<br>
&gt; Diyu<br>
&gt; <br>
&gt; <br>
&gt;  <br>
<br>
&gt; _______________________________________________<br>
&gt; CRIU mailing list<br>
&gt; <a href="mailto:CRIU@openvz.org" target="_blank">CRIU@openvz.org</a><br>
&gt; <a href="https://lists.openvz.org/mailman/listinfo/criu" rel="noreferrer" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
<br>
<br>
-- <br>
Sincerely yours,<br>
Mike.<br>
<br>
</blockquote></div>