Re: 2.6.9-rc1-mm5
From: Kirill Korotaev
Date:  Mon Sep 13 2004 - 11:35:11 EST
Hello Andrew,
Please replace patch next_thread-bug-fixes.patch in -mm5 tree with the 
last diff-next_thread I sent to you.
And it looks like thread loop in do_task_stat() doesn't require siglock 
lock, so you can add the patch attached to reduce lock area.
Kirill
--- ./fs/proc/array.c.nt	2004-09-13 18:56:17.000000000 +0400
+++ ./fs/proc/array.c	2004-09-13 19:13:03.749684712 +0400
@@ -338,6 +338,7 @@ static int do_task_stat(struct task_stru
 		spin_lock_irq(&task->sighand->siglock);
 		num_threads = atomic_read(&task->signal->count);
 		collect_sigign_sigcatch(task, &sigign, &sigcatch);
+		spin_unlock_irq(&task->sighand->siglock);
 
 		/* add up live thread stats at the group level */
 		if (whole) {
@@ -350,8 +351,6 @@ static int do_task_stat(struct task_stru
 				t = next_thread(t);
 			} while (t != task);
 		}
-
-		spin_unlock_irq(&task->sighand->siglock);
 	}
 	if (task->signal) {
 		if (task->signal->tty) {