public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 7/6] fill_tgid: cleanup delays accounting
@ 2006-10-27 17:56 Oleg Nesterov
  0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2006-10-27 17:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Shailabh Nagar, Balbir Singh, Jay Lan, linux-kernel

fill_tgid() should skip not only an already exited group leader. If the
task has ->exit_state != 0 it already did exit_notify(), so it also did
fill_tgid_exit()->delayacct_add_tsk(->signal->stats) and we should skip
it to avoid a double accounting.

This patch doesn't close the race completely, but it cleanups the code.

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

--- STATS/kernel/taskstats.c~7_estate	2006-10-27 03:03:40.000000000 +0400
+++ STATS/kernel/taskstats.c	2006-10-27 21:34:26.000000000 +0400
@@ -235,7 +235,7 @@ static int fill_tgid(pid_t tgid, struct 
 
 	tsk = first;
 	do {
-		if (tsk->exit_state == EXIT_ZOMBIE && thread_group_leader(tsk))
+		if (tsk->exit_state)
 			continue;
 		/*
 		 * Accounting subsystem can call its functions here to


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-27 17:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-27 17:56 [PATCH 7/6] fill_tgid: cleanup delays accounting Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox