Skip to contentSkip to conversation

zap_other_threads: don't optimize thread_group_empty() case

PATCH In review Oleg Nesterov 2 participants 2 messages Aug 5, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zap_other_threads: don't optimize thread_group_empty() case

Nowadays thread_group_empty() and next_thread() are simple list operations, this optimization doesn't make sense: we are doing exactly same check one line below.

kernel/signal.c renamed from kernel/signal.c~4_ZOT +0 -3
@@ -987,9 +987,6 @@ void zap_other_threads(struct task_struc
 	p->signal->flags = SIGNAL_GROUP_EXIT;
 	p->signal->group_stop_count = 0;
 
-	if (thread_group_empty(p))
-		return;
-
 	for (t = next_thread(p); t != p; t = next_thread(t)) {
 		/*
 		 * Don't bother with already dead threads