]> git.baikalelectronics.ru Git - kernel.git/commit
softlockup: check all tasks in hung_task
authorMandeep Singh Baines <msb@google.com>
Thu, 5 Feb 2009 04:35:48 +0000 (20:35 -0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 5 Feb 2009 18:54:57 +0000 (19:54 +0100)
commit817a14eecff301c3e6537474bf253d59189fd501
treea6278f5f012d2284aecbeb17bf5371d4864963d3
parent191131b85a87e6179210363274c445bc49ed4a5d
softlockup: check all tasks in hung_task

Impact: extend the scope of hung-task checks

Changed the default value of hung_task_check_count to PID_MAX_LIMIT.
hung_task_batch_count added to put an upper bound on the critical
section. Every hung_task_batch_count checks, the rcu lock is never
held for a too long time.

Keeping the critical section small minimizes time preemption is disabled
and keeps rcu grace periods small.

To prevent following a stale pointer, get_task_struct is called on g and t.
To verify that g and t have not been unhashed while outside the critical
section, the task states are checked.

The design was proposed by Frédéric Weisbecker.

Signed-off-by: Mandeep Singh Baines <msb@google.com>
Suggested-by: Frédéric Weisbecker <fweisbec@gmail.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/hung_task.c