login
Header Space

 
 

sysrq

SysRq Help

October 23, 2007 - 2:47am
Submitted by Jeremy on October 23, 2007 - 2:47am.
Linux news

"For SysRq, we can get [a] hot key list from Documentation/sysrq.txt, but in most of cases, the user can't access it [when] using SysRq to debug, so it is better for SysRq to provide online help for the users," Yi Yang noted, explaining the need for his patch to improve SysReq's built in help. He continued, "in addition, that function has a big loop with another big loop embedded which is very inefficient".

The general reaction was that the changes were unnecessary. Valdis Kletnieks pointed out, "you're optimizing code that hopefully never gets executed, and even if it does, you have the optimization *backwards*. If you're worried about the efficiency, trim it down to output 3 lines - do you realize how many instructions it takes in the VGA and fb drivers to actually *output* all these lines?" He added that people using SysRq for debugging usually fall into two classes and don't require lengthy online help, "1) he has been told 'recreate the problem, hit alt-sysreq-cokebottle, and send me the results', or 2) he's already read the file in Documentation/ and just needs a reminder."

Debugging Multiple CPUs

October 22, 2007 - 2:19pm
Submitted by Jeremy on October 22, 2007 - 2:19pm.
Linux news

"Sysrq-p is pretty useless unless you can force the keyboard interrupt and the spinning process onto the same CPU," noted Chuck Ebbert during a discussion centered around debugging tasks stuck in a running state. Pressing the <Alt><SysRq><p> key combination is used for debugging, dumping the registers and flags from the CPU that handles the keypress interrupt to the console. UltraSPARC maintainer, David Miller, replied, "yes, I find this a painful limitation too," adding:

"Sparc64 used to dump the registers on all active cpus for show_regs() via a cross-call, and this was incredibly useful. But I disabled that as soon as I started playing with Niagara because at 32 cpus and larger the output is just too voluminous to be useful."

David then suggested, "what might be appropriate is just to get a one-line program counter dump on every cpu via some new sysrq keystroke." Chuck noted that similar functionality is provided by a patch in the -mm kernel, "IIRC -mm had something like this but it was buggy because we were sending IPIs to each processor asking them to print their state. Maybe it would work if we had a way of making them dump their state to a memory location and then collected and printed it from the CPU that's handling the sysrq."

speck-geostationary