Skip to contentSkip to conversation

more sync wakeups, 2.6.5-rc3-mm1

PATCH In review Ingo Molnar 1 participant 2 messages Mar 30, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 more sync wakeups, 2.6.5-rc3-mm1

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.)

compiled & tested.

Ingo

#1 lore raw

(patch attached now.)

Quoted 4 lines · 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).

Quoted 8 lines

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.)

compiled & tested.

Ingo

kernel/signal.c renamed from kernel/signal.c.orig +2 -2
@@ -1386,12 +1386,12 @@ static inline void __wake_up_parent(stru
 	 * 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();