<div dir="ltr"><div class="gmail_default" style="font-family:arial,sans-serif">I am trying to understand the &quot;<b>restore</b>&quot; call sequence for a process tree that involves a plugin.</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif"><b>Scenario</b>:</div><div class="gmail_default" style=""><ul style="font-family:arial,sans-serif"><li>The system has two GPUs</li><li>Parent process forks a child</li><li>The checkpointing and restore procedures are handled by <b>amdgpu</b> plugin</li><li>The checkpointing of a process results in three files<br></li><li>For the scenario this will result in six files</li><ul><li>3 files for the parent labeled as PF1, PF2 and PF3</li><li>3 files for the child labeled as CF1, CF2 and CF3</li></ul></ul><b style="font-family:arial,sans-serif">Questions</b><span style="font-family:arial,sans-serif">:</span><br><div style=""><ul style=""><li>What kind of behavioral guarantees can I expect from the CRIU framework</li><li>In my experimentation:</li><ul><li>CRIU framework tries to restore the two processes concurrently</li><li>For any process being restored</li><ul><li>CRIU calls plugin api with the file handles in the order in which they were generated</li></ul><li>For the parent process this will be PF1 -&gt; PF2 -&gt; PF3<br></li><li>For the child process this will be CF1 -&gt; CF2 -&gt; CF3</li></ul><li style="font-family:arial,sans-serif">Is my statement about process restoration order (PF1 -&gt; PF2 -&gt; PF3) correct ?</li><ul style="font-family:arial,sans-serif"><li>If so another sequence such as (PF2 -&gt; PF1 -&gt; PF3) would be considered invalid</li></ul><li style="font-family:arial,sans-serif">Is there a particular order in which process restoration begins?<br></li><ul style="font-family:arial,sans-serif"><li>In my experimentation restoration of child process begins first</li><li>Is this behavior designed into the restore algorithm</li></ul><li style="font-family:arial,sans-serif">Since restoration of processes seem to be concurrent</li><ul style=""><li>is it correct to assume that state from one process will NOT BE available to another process of the same tree</li><ul><li>In this example state from parent process would NOT become available for child process or vice-versa</li></ul><li style="font-family:arial,sans-serif">Per my experience users cannot assume that state from one process would be available to another process</li><li style="font-family:arial,sans-serif">The order in which processes are restored could change</li><li style="font-family:arial,sans-serif">The restoration of a processes state could be fragmented across multiple files</li><ul style="font-family:arial,sans-serif"><li>In this example, the state is checkpointed into 3 files</li></ul><li><span style="font-family:arial,sans-serif">A global ordering of restore is considered valid if it ensures the files of all process are restored in order without regard to files of other processes</span><br></li><li><span style="font-family:arial,sans-serif">Following restore orders are legal</span><br></li><ul style="font-family:arial,sans-serif"><li><b>PF1, PF2, PF3, CF1, CF2, CF3</b><br></li><li><b>CF1, PF1, CF2, PF2, CF3, PF3</b><br></li><li><b>CF1, CF2, PF1, CF3, PF2, PF3</b><br></li></ul></ul></ul></div></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font face="arial, sans-serif"><span class="gmail_default" style="font-family:arial,sans-serif">I hope my explanation is clear. Looking forward to responses that would help me correct or improve my understanding.</span></font></div><div dir="ltr"><font face="arial, sans-serif"><br></font></div><div dir="ltr"><font face="arial, sans-serif">Regards,</font><div><font face="arial, sans-serif">Ramesh</font></div></div></div></div></div>