<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 "clean" pages are copied by the CRIU.</div><div><br></div><div>For example, let's say CRIU performs iterative checkpoints (let'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'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 <<a href="mailto:rppt@linux.ibm.com">rppt@linux.ibm.com</a>> 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>
> Hey, <br>
> <br>
> Firstly, thanks for the great tool! It is very very helpful. I can see the<br>
> development of such a tool <br>
> is very challenging and you guys do several clever tricks to make it possible.<br>
> I enjoy a lot using <br>
> the tool as well as reading the source code and have learned a lot from it. <br>
> <br>
> I have a question regarding the implementation of the soft dirty pages. From<br>
> what I can tell, if <br>
> a VMA is expanded, all the pages within it will be marked as soft dirty. This<br>
> seems to me will <br>
> result in unnecessarily transferring clean pages when iterative dumps are<br>
> performed. <br>
> Is there any reason not just mark the pages in the expanded part of the VMA<br>
> 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>
> Thanks again for the wonderful tool and your help! <br>
> <br>
> Best,<br>
> Diyu<br>
> <br>
> <br>
> <br>
<br>
> _______________________________________________<br>
> CRIU mailing list<br>
> <a href="mailto:CRIU@openvz.org" target="_blank">CRIU@openvz.org</a><br>
> <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>