Commit 7dc12702 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] sched: extend sync wakeups

From: Ingo Molnar <mingo@elte.hu>

The attached patch extends sync wakeups to the process sys_exit() path too:
the chldwait wakeup can be done sync, since we know that the process is
going to exit (and thus deschedule).

The most visible effect of this change is strace's behavior on SMP systems:
it now stays on a single CPU, together with the traced child.  (previously
it would run in parallel to the child, bouncing around madly.)
parent 3c6f29aa
......@@ -1403,12 +1403,12 @@ static void __wake_up_parent(struct task_struct *p,
* Fortunately this is not necessary for thread groups:
*/
if (p->tgid == tsk->tgid) {
wake_up_interruptible(&tsk->wait_chldexit);
wake_up_interruptible_sync(&tsk->wait_chldexit);
return;
}
do {
wake_up_interruptible(&tsk->wait_chldexit);
wake_up_interruptible_sync(&tsk->wait_chldexit);
tsk = next_thread(tsk);
if (tsk->signal != parent->signal)
BUG();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment