[CRIU] About re-parenting

Adrian Reber adrian at lisas.de
Tue Mar 25 10:21:02 PDT 2014


On Tue, Mar 25, 2014 at 05:25:48PM +0400, Pavel Emelyanov wrote:
> >> IOW the syscalls and process tree would look like this
> >>
> >> 1. exec("orte-restart", "restore", ...)
> >>
> >>    12 open-mpi-engine
> >>    13  `- orte-restart
> >>
> >> 2. orte calls criu with exec("criu", "restore", ...)
> >>
> >>    12 open-mpi-engine
> >>    13  `- criu restore
> >>
> >> 3. criu does restoring -- forking tasks and restoring it
> >>
> >>    12 open-mpi-engine
> >>    13  `- criu restore
> >>    125     `- my-openmpi-process
> >>
> >> 4. criu calls exec("orte-restart", "continue-watching-your-kids", ...)
> >>
> >>    12 open-mpi-engine
> >>    13  `- orte-restart
> >>    125     `- my-openmpi-process
> >>
> >> Does it look like what we want? The question how to preserve the pipes is
> >> still open, but let's sort out how to restore the process linkage first.
> > 
> > This is almost what we want and I agree resolving process linkage is the
> > more important part.
> > 
> > At the end it should look like this:
> > 
> >     12 open-mpi-engine
> >     13  `- my-openmpi-process
> 
> Hm, but the pid of my-openmpi-process should be not generated, but
> restored to the exact value it used to have, i.e. the tree should
> look like
> 
>      12 open-mpi-engine
>      125  `- my-openmpi-process

Yes, of course. The PID should be the same as previously.

> > The restart process should be replaced by the process which has been
> > restored and the restored process should be the child of the Open MPI
> > runtime. 
> 
> I see. In other words the orte-restore should transform itself into the
> process we want to restore, right?

Correct.

		Adrian


More information about the CRIU mailing list