diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-12-06 20:35:59 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 08:39:32 -0800 |
commit | e59e2ae2c29700117a54e85c106017c24837119f (patch) | |
tree | d746e90d2d79fa8458d021d3572bc55ebdc3aca3 /kernel | |
parent | 875d95ec9eb69ffb334116fb44d04d9a64dcbfbb (diff) | |
download | op-kernel-dev-e59e2ae2c29700117a54e85c106017c24837119f.zip op-kernel-dev-e59e2ae2c29700117a54e85c106017c24837119f.tar.gz |
[PATCH] SysRq-X: show blocked tasks
Add SysRq-X support: show blocked (TASK_UNINTERRUPTIBLE) tasks only.
Useful for debugging IO stalls.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 12fdbef..1848e28 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4804,7 +4804,7 @@ static void show_task(struct task_struct *p) show_stack(p, NULL); } -void show_state(void) +void show_state_filter(unsigned long state_filter) { struct task_struct *g, *p; @@ -4824,11 +4824,16 @@ void show_state(void) * console might take alot of time: */ touch_nmi_watchdog(); - show_task(p); + if (p->state & state_filter) + show_task(p); } while_each_thread(g, p); read_unlock(&tasklist_lock); - debug_show_all_locks(); + /* + * Only show locks if all tasks are dumped: + */ + if (state_filter == -1) + debug_show_all_locks(); } /** |