Re: [PATCH 1/2 v3] sysrq: showBlockedTasks is sysrq-W
On Sat, Jan 06, 2007 at 02:04:24PM -0800, Randy Dunlap wrote: > +.help_msg = "showBlockedTasks(W)", Why not the same scheme as the existing help msgs.. shoWblockedtasks ? Dave -- http://www.codemonkey.org.uk - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/2 v3] sysrq: showBlockedTasks is sysrq-W
From: Randy Dunlap <[EMAIL PROTECTED]> SysRq showBlockedTasks is not done via B or T, it's done via W, so put that in the Help message. It was previously done via X, but X is already used for Xmon on ppc & powerpc platforms and this collision needs to be avoided. All callers of register_sysrq_key() are now marked in the sysrq op/key table. I didn't mark 'h' as Help because Help is just printed for any unknown key, such as '?'. Added some omitted sysrq key entries in the sysrq.txt file. Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]> --- Documentation/sysrq.txt | 66 +--- drivers/char/sysrq.c| 20 -- 2 files changed, 46 insertions(+), 40 deletions(-) --- linux-2620-rc3g4.orig/drivers/char/sysrq.c +++ linux-2620-rc3g4/drivers/char/sysrq.c @@ -215,7 +215,7 @@ static void sysrq_handle_showstate_block } static struct sysrq_key_op sysrq_showstate_blocked_op = { .handler= sysrq_handle_showstate_blocked, - .help_msg = "showBlockedTasks", + .help_msg = "showBlockedTasks(W)", .action_msg = "Show Blocked State", .enable_mask= SYSRQ_ENABLE_DUMP, }; @@ -315,15 +315,16 @@ static struct sysrq_key_op *sysrq_key_ta _loglevel_op, /* 9 */ /* -* Don't use for system provided sysrqs, it is handled specially on -* sparc and will never arrive +* a: Don't use for system provided sysrqs, it is handled specially on +* sparc and will never arrive. */ NULL, /* a */ _reboot_op, /* b */ - _crashdump_op,/* c */ + _crashdump_op,/* c & ibm_emac driver debug */ _showlocks_op,/* d */ _term_op, /* e */ _moom_op, /* f */ + /* g: May be registered by ppc for kgdb */ NULL, /* g */ NULL, /* h */ _kill_op, /* i */ @@ -332,18 +333,19 @@ static struct sysrq_key_op *sysrq_key_ta NULL, /* l */ _showmem_op, /* m */ _unrt_op, /* n */ - /* This will often be registered as 'Off' at init time */ + /* o: This will often be registered as 'Off' at init time */ NULL, /* o */ _showregs_op, /* p */ NULL, /* q */ - _unraw_op,/* r */ + _unraw_op,/* r */ _sync_op, /* s */ _showstate_op,/* t */ _mountro_op, /* u */ - /* May be assigned at init time by SMP VOYAGER */ + /* v: May be registered at init time by SMP VOYAGER */ NULL, /* v */ - NULL, /* w */ - _showstate_blocked_op,/* x */ + _showstate_blocked_op,/* w */ + /* x: May be registered on ppc/powerpc for xmon */ + NULL, /* x */ NULL, /* y */ NULL/* z */ }; --- linux-2620-rc3g4.orig/Documentation/sysrq.txt +++ linux-2620-rc3g4/Documentation/sysrq.txt @@ -1,6 +1,6 @@ Linux Magic System Request Key Hacks -Documentation for sysrq.c version 1.15 -Last update: $Date: 2001/01/28 10:15:59 $ +Documentation for sysrq.c +Last update: 2007-JAN-06 * What is the magic SysRq key? ~~~ @@ -35,7 +35,7 @@ You can set the value in the file by the Note that the value of /proc/sys/kernel/sysrq influences only the invocation via a keyboard. Invocation of any operation via /proc/sysrq-trigger is always -allowed. +allowed (by a user with admin privileges). * How do I use the magic SysRq key? @@ -58,7 +58,7 @@ On PowerPC - Press 'ALT - Print Screen ( On other - If you know of the key combos for other architectures, please let me know so I can add them to this section. -On all - write a character to /proc/sysrq-trigger. eg: +On all - write a character to /proc/sysrq-trigger. e.g.: echo t > /proc/sysrq-trigger @@ -74,6 +74,8 @@ On all - write a character to /proc/sys 'c'- Will perform a kexec reboot in order to take a crashdump. +'d'- Shows all locks that are held. + 'o' - Will shut your system off (if configured and supported). 's' - Will attempt to sync all mounted filesystems. @@ -87,38 +89,43 @@ On all - write a character to /proc/sys 'm' - Will dump current memory info to your console. +'n'- Used to make RT tasks nice-able + 'v'- Dumps Voyager SMP processor info to your console. +'w'- Dumps tasks that are in uninterruptable (blocked) state. + +'x'- Used by xmon interface on ppc/powerpc platforms. + '0'-'9' -
[PATCH 1/2 v3] sysrq: showBlockedTasks is sysrq-W
From: Randy Dunlap [EMAIL PROTECTED] SysRq showBlockedTasks is not done via B or T, it's done via W, so put that in the Help message. It was previously done via X, but X is already used for Xmon on ppc powerpc platforms and this collision needs to be avoided. All callers of register_sysrq_key() are now marked in the sysrq op/key table. I didn't mark 'h' as Help because Help is just printed for any unknown key, such as '?'. Added some omitted sysrq key entries in the sysrq.txt file. Signed-off-by: Randy Dunlap [EMAIL PROTECTED] --- Documentation/sysrq.txt | 66 +--- drivers/char/sysrq.c| 20 -- 2 files changed, 46 insertions(+), 40 deletions(-) --- linux-2620-rc3g4.orig/drivers/char/sysrq.c +++ linux-2620-rc3g4/drivers/char/sysrq.c @@ -215,7 +215,7 @@ static void sysrq_handle_showstate_block } static struct sysrq_key_op sysrq_showstate_blocked_op = { .handler= sysrq_handle_showstate_blocked, - .help_msg = showBlockedTasks, + .help_msg = showBlockedTasks(W), .action_msg = Show Blocked State, .enable_mask= SYSRQ_ENABLE_DUMP, }; @@ -315,15 +315,16 @@ static struct sysrq_key_op *sysrq_key_ta sysrq_loglevel_op, /* 9 */ /* -* Don't use for system provided sysrqs, it is handled specially on -* sparc and will never arrive +* a: Don't use for system provided sysrqs, it is handled specially on +* sparc and will never arrive. */ NULL, /* a */ sysrq_reboot_op, /* b */ - sysrq_crashdump_op,/* c */ + sysrq_crashdump_op,/* c ibm_emac driver debug */ sysrq_showlocks_op,/* d */ sysrq_term_op, /* e */ sysrq_moom_op, /* f */ + /* g: May be registered by ppc for kgdb */ NULL, /* g */ NULL, /* h */ sysrq_kill_op, /* i */ @@ -332,18 +333,19 @@ static struct sysrq_key_op *sysrq_key_ta NULL, /* l */ sysrq_showmem_op, /* m */ sysrq_unrt_op, /* n */ - /* This will often be registered as 'Off' at init time */ + /* o: This will often be registered as 'Off' at init time */ NULL, /* o */ sysrq_showregs_op, /* p */ NULL, /* q */ - sysrq_unraw_op,/* r */ + sysrq_unraw_op,/* r */ sysrq_sync_op, /* s */ sysrq_showstate_op,/* t */ sysrq_mountro_op, /* u */ - /* May be assigned at init time by SMP VOYAGER */ + /* v: May be registered at init time by SMP VOYAGER */ NULL, /* v */ - NULL, /* w */ - sysrq_showstate_blocked_op,/* x */ + sysrq_showstate_blocked_op,/* w */ + /* x: May be registered on ppc/powerpc for xmon */ + NULL, /* x */ NULL, /* y */ NULL/* z */ }; --- linux-2620-rc3g4.orig/Documentation/sysrq.txt +++ linux-2620-rc3g4/Documentation/sysrq.txt @@ -1,6 +1,6 @@ Linux Magic System Request Key Hacks -Documentation for sysrq.c version 1.15 -Last update: $Date: 2001/01/28 10:15:59 $ +Documentation for sysrq.c +Last update: 2007-JAN-06 * What is the magic SysRq key? ~~~ @@ -35,7 +35,7 @@ You can set the value in the file by the Note that the value of /proc/sys/kernel/sysrq influences only the invocation via a keyboard. Invocation of any operation via /proc/sysrq-trigger is always -allowed. +allowed (by a user with admin privileges). * How do I use the magic SysRq key? @@ -58,7 +58,7 @@ On PowerPC - Press 'ALT - Print Screen ( On other - If you know of the key combos for other architectures, please let me know so I can add them to this section. -On all - write a character to /proc/sysrq-trigger. eg: +On all - write a character to /proc/sysrq-trigger. e.g.: echo t /proc/sysrq-trigger @@ -74,6 +74,8 @@ On all - write a character to /proc/sys 'c'- Will perform a kexec reboot in order to take a crashdump. +'d'- Shows all locks that are held. + 'o' - Will shut your system off (if configured and supported). 's' - Will attempt to sync all mounted filesystems. @@ -87,38 +89,43 @@ On all - write a character to /proc/sys 'm' - Will dump current memory info to your console. +'n'- Used to make RT tasks nice-able + 'v'- Dumps Voyager SMP processor info to your console. +'w'- Dumps tasks that are in uninterruptable (blocked)
Re: [PATCH 1/2 v3] sysrq: showBlockedTasks is sysrq-W
On Sat, Jan 06, 2007 at 02:04:24PM -0800, Randy Dunlap wrote: +.help_msg = showBlockedTasks(W), Why not the same scheme as the existing help msgs.. shoWblockedtasks ? Dave -- http://www.codemonkey.org.uk - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/