diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-12-06 23:35:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:32 -0500 |
commit | e59e2ae2c29700117a54e85c106017c24837119f (patch) | |
tree | d746e90d2d79fa8458d021d3572bc55ebdc3aca3 /kernel/sched.c | |
parent | 875d95ec9eb69ffb334116fb44d04d9a64dcbfbb (diff) |
[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/sched.c')
-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 12fdbef1d9bf..1848e280504d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4804,7 +4804,7 @@ static void show_task(struct task_struct *p) | |||
4804 | show_stack(p, NULL); | 4804 | show_stack(p, NULL); |
4805 | } | 4805 | } |
4806 | 4806 | ||
4807 | void show_state(void) | 4807 | void show_state_filter(unsigned long state_filter) |
4808 | { | 4808 | { |
4809 | struct task_struct *g, *p; | 4809 | struct task_struct *g, *p; |
4810 | 4810 | ||
@@ -4824,11 +4824,16 @@ void show_state(void) | |||
4824 | * console might take alot of time: | 4824 | * console might take alot of time: |
4825 | */ | 4825 | */ |
4826 | touch_nmi_watchdog(); | 4826 | touch_nmi_watchdog(); |
4827 | show_task(p); | 4827 | if (p->state & state_filter) |
4828 | show_task(p); | ||
4828 | } while_each_thread(g, p); | 4829 | } while_each_thread(g, p); |
4829 | 4830 | ||
4830 | read_unlock(&tasklist_lock); | 4831 | read_unlock(&tasklist_lock); |
4831 | debug_show_all_locks(); | 4832 | /* |
4833 | * Only show locks if all tasks are dumped: | ||
4834 | */ | ||
4835 | if (state_filter == -1) | ||
4836 | debug_show_all_locks(); | ||
4832 | } | 4837 | } |
4833 | 4838 | ||
4834 | /** | 4839 | /** |