From 7dc127021abbd45d928fafdcd57422d689e18be5 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 9 May 2004 23:28:20 -0700 Subject: [PATCH] [PATCH] sched: extend sync wakeups From: Ingo Molnar 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.) --- kernel/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index a9181552a76e0..7d582211959e2 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(); -- 2.53.0