aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-12-06 23:35:59 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:32 -0500
commite59e2ae2c29700117a54e85c106017c24837119f (patch)
treed746e90d2d79fa8458d021d3572bc55ebdc3aca3 /drivers
parent875d95ec9eb69ffb334116fb44d04d9a64dcbfbb (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 'drivers')
-rw-r--r--drivers/char/sysrq.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index c64f5bcff947..05810c8d20bc 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -182,6 +182,18 @@ static struct sysrq_key_op sysrq_showstate_op = {
182 .enable_mask = SYSRQ_ENABLE_DUMP, 182 .enable_mask = SYSRQ_ENABLE_DUMP,
183}; 183};
184 184
185static void sysrq_handle_showstate_blocked(int key, struct tty_struct *tty)
186{
187 show_state_filter(TASK_UNINTERRUPTIBLE);
188}
189static struct sysrq_key_op sysrq_showstate_blocked_op = {
190 .handler = sysrq_handle_showstate_blocked,
191 .help_msg = "showBlockedTasks",
192 .action_msg = "Show Blocked State",
193 .enable_mask = SYSRQ_ENABLE_DUMP,
194};
195
196
185static void sysrq_handle_showmem(int key, struct tty_struct *tty) 197static void sysrq_handle_showmem(int key, struct tty_struct *tty)
186{ 198{
187 show_mem(); 199 show_mem();
@@ -304,7 +316,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
304 /* May be assigned at init time by SMP VOYAGER */ 316 /* May be assigned at init time by SMP VOYAGER */
305 NULL, /* v */ 317 NULL, /* v */
306 NULL, /* w */ 318 NULL, /* w */
307 NULL, /* x */ 319 &sysrq_showstate_blocked_op, /* x */
308 NULL, /* y */ 320 NULL, /* y */
309 NULL /* z */ 321 NULL /* z */
310}; 322};