Re: [RFC] Changing SysRq - show registers handling

From: Keith Owens
Date: Thu Jun 03 2004 - 17:23:14 EST


On Thu, 3 Jun 2004 17:06:01 -0400,
Theodore Ts'o <tytso@xxxxxxx> wrote:
>On Thu, Jun 03, 2004 at 09:44:01AM +0200, Oliver Neukum wrote:
>> Am Donnerstag, 3. Juni 2004 09:27 schrieb Dmitry Torokhov:
>> > I don't like the requirement of SysRq request processing being in hard
>> > interrupt handler - that excludes uinput-generated events and precludes
>> > moving keyboard handling to a tasklet for example.
>>
>> SysRq should work even if bottom halfs don't.
>
>Indeed; one of the times when SysRq-p is used in the field is when the
>machine is completely wedged. Sometimes it's the only way to figure
>out where the machine is wedged. It would be unfortunate if the
>number of cases (when the kernel is four feet in the air and
>twitching) where SysRq worked decreases as a result of the proposed
>change.

KDB has a similar problem, it needs struct pt_regs as a starting point
for backtraces and that is not always available. I get around the lack
of a pt_regs by using KDB_ENTER() which generates a software interrupt.
We could define a software interrupt for SYSRQ_ENTER(key). This would
remove all the overhead of saving and tracking pt_regs from the fast
paths. The downside is that it needs a software interrupt to be
defined for every arch :(.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/