[2.4 Patch] Fix to get all sysrq-T output on iSeries virtual console

Julie DeWandel jdewand at redhat.com
Tue Nov 4 07:41:51 EST 2003


Hi,

When debugging iSeries problems, I've been frustrated sometimes when I
find I cannot get all of the sysrq-t output on my console. Usually data
for only about 5 or 6 tasks prints out and that is it.

I investigated this problem and found the cause. When a person types
sysrq-t, the viocons interrupt handler intercepts it and calls directly
into handle_sysrq. This routine, in turn, formats data for the requested
sysrq key and sends it to the viocons_write routine. The viocons_write
routine can only write up to the limit of the internal overflow buffers
in the viocons driver and nothing further until it gets an ACK back from
the OS/400. But it doesn't look for the ACK.

So I modified the code to look for ACKs coming back once the
viocons_write routine fills up the overflow buffers. However, this
*still* wasn't enough to fix the problem. As it turns out, even if we
can detect an awaiting ACK, calling process_iSeries_events() will refuse
to work since we are still inside an interrupt handler and there is a
guard to protect you from servicing interrupts from within an interrupt
handler.

My final idea was to not service sysrq interrupts from within the
critical area of the interrupt service routine. Instead, I borrowed a
byte from an unused field within the paca and I cache the requested
sysrq key there. Then, on the way out of the ISR, this field is checked.
If it contains a non-zero character, handle_sysrq is called with the
character to service the request.

I'm sure this patch is controversial and perhaps too much of a hack, but
it does get the job done in those critical situations where you
absolutely need the output of sysrq-t to debug a soft hang.

What do you think?

--
Julie DeWandel <jdewand at redhat.com>
Red Hat, Inc.
Tel (978) 692-3113 x23251

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sysrq_patch
Url: http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20031103/e338605e/attachment.txt 


More information about the Linuxppc64-dev mailing list