[Devel] Re: [PATCH][usercr]: Ghost tasks must be detached

Sukadev Bhattiprolu sukadev at linux.vnet.ibm.com
Thu Feb 10 09:42:18 PST 2011


Oren Laadan [orenl at cs.columbia.edu] wrote:
| 
| 
| On 02/10/2011 01:17 AM, Sukadev Bhattiprolu wrote:
| > Oren Laadan [orenl at cs.columbia.edu] wrote:
| > | 
| > | To address this, initially I thought that we could make ghosts take
| > | the tasklist_lock (write) when they change their ->exit_signal. 
| > | 
| > | But that's not enough because the parent may already be blocked in
| > | wait (so it's too late). Therefore, we also need to have ghosts 
| > | wake-up their parent through __wake_up_parent().
| > | 
| > | so something like:
| > | 
| > | void ghost_auto_reapable()
| > | {
| > | 	write_lock(&tasklist_lock);
| > | 	current->exit_signal = -1;
| > | 	__wake_up_sync_key(current, current->parent);
| > | 	write_unlock(&tasklist_lock);
| > 
| > You meant __wake_up_parent() here I guess.

Hmm, can we have the above wakeup and, like in 2.6.32, have do_wait_thread()
skip over detached tasks ? Since we set ->exit_signal above,
do_wait_thread() should not wait for us.

I will go through Oleg's patch earlier again. But my guess, without C/R
do_wait_thread() had no reason to have a detached child in do_wait_thread()
which is probably why Oleg removed it.

I will look at the exit_checkpoint() change you mention later today.

Sukadev
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list