[RFC][PATCH] Add child reaper to struct pspace

Herbert Poetzl herbert at 13thfloor.at
Thu Sep 7 08:41:54 PDT 2006


On Thu, Sep 07, 2006 at 04:25:41PM +0400, Kirill Korotaev wrote:
> Sukadev Bhattiprolu wrote:
> 
> [...skip...]
> 
> > @@ -857,7 +858,7 @@ fastcall NORET_TYPE void do_exit(long co
> >  		panic("Aiee, killing interrupt handler!");
> >  	if (unlikely(!tsk->pid))
> >  		panic("Attempted to kill the idle task!");
> > -	if (unlikely(tsk == child_reaper))
> > +	if (unlikely(tsk == tsk->pspace->child_reaper))
> >  		panic("Attempted to kill init!");
> this panic is wrong here.
> 
> My HO is that termination of init task
> should terminate all the other tasks in pspace.

well, this is one way to handle it, another way
(also implemented in Linux-VServer) is to switch
to the 'main' child_reaper of the host context
and/or to allow to select/start a new reaper
inside the guest, still another option (which I
do not really favor) is to have a kernel thread
which poses as reaper inside the guest (either
once init is gone or in general)

the problem I see here is that once the guest
child_reaper (note: this is not necessary the
init process, but let's assume it is for now :)
terminates, it will not be able to do the reaping
at all, so terminating the other guest processes
might not be as simple as it sounds ....

> Otherwise you have too select some one else to be child_reaper
> and actually there is no good choice here as no one except init
> is going to wait() for children.

except for the host/master init :)

best,
Herbert

> p.s. can you enumerate these patches please?
> since I failed to find where  struct pspace was introduced...
> imho in previous patch set? was that patch set already commited to -mm?
> 
> Thanks,
> Kirill
> 
> _______________________________________________
> Containers mailing list
> Containers at lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/containers



More information about the Containers mailing list