diff options
author | Andrew Morton <akpm@osdl.org> | 2004-05-09 23:28:20 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-09 23:28:20 -0700 |
commit | 7dc127021abbd45d928fafdcd57422d689e18be5 (patch) | |
tree | d5b29bbb9203961442ea7bf79d88226686777545 /kernel | |
parent | 3c6f29aac8aba4db3b4716003ab86acc466e3951 (diff) | |
download | history-7dc127021abbd45d928fafdcd57422d689e18be5.tar.gz |
[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.)
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/signal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index a9181552a76e0e..7d582211959e2f 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -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(); |