linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] zap_other_threads: don't optimize thread_group_empty() case
@ 2007-08-05 15:36 Oleg Nesterov
  2007-08-05 20:47 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2007-08-05 15:36 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Roland McGrath, linux-kernel

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.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- t/kernel/signal.c~4_ZOT	2007-08-03 21:11:59.000000000 +0400
+++ t/kernel/signal.c	2007-08-05 19:28:13.000000000 +0400
@@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] zap_other_threads: don't optimize thread_group_empty() case
  2007-08-05 15:36 [PATCH] zap_other_threads: don't optimize thread_group_empty() case Oleg Nesterov
@ 2007-08-05 20:47 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2007-08-05 20:47 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: Andrew Morton, linux-kernel

Looks fine to me.

Thanks,
Roland

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-05 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-05 15:36 [PATCH] zap_other_threads: don't optimize thread_group_empty() case Oleg Nesterov
2007-08-05 20:47 ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).