Re: [PATCH 0/2] [RFC] RT: Optionally allow IRQF_NODELAY on serialconsole
From: Steven Rostedt
Date: Mon Oct 08 2007 - 10:11:33 EST
--
On Fri, 5 Oct 2007, Thomas Gleixner wrote:
> On Fri, 5 Oct 2007, Gregory Haskins wrote:
> > This series may help debugging certain circumstances where the serial
> > console is unreponsive (e.g. RT51+ spinner, or scheduler problem). It changes
> > the serial8250 driver to use IRQF_NODELAY so that interrupts execute in irq
> > context instead of a kthread.
> >
> > It works pretty well on this end, though it is admitted not fully baked. For
> > instance, a few paths in sysrq can still call into non-raw spinlocks
> > (sched_debug_show, for instance) which will cause subsequent errors. Also,
> > if you use KDB, be sure to convert the kdb_printf_lock to raw as well. I may
> > send a KDB related patch seperately.
> >
> > I am sending this out now in case it is helpful to someone.
>
> The simple non-patch solution is to up the priority of the serial
> console irq to maximum. That's usually sufficient to catch runnaway tasks
> etc. It does not interfere with the system in normal operation as long as
> you do not hit keys in your minicom.
>
> I doubt that your patch has a chance to survive lockdep and anything which
> is not a sysrq.
This issue has hit me enough times where I've played with a few other
ideas. I just haven't had the time to finish them. The main problem is if
the system locks up somewhere we have a lock held that keeps us from
scheduling. Once that happens in -rt, we are as good as dead. Since you
can't get much info out without a JTAG or some other mechanism.
One thought I had was to create a small handler that could read the serial
and place data into a buffer. This handler would be a IRQ_NODELAY, and it
would wake up a serial thread to handle the data just like it would for
normal serial output. But the serial thread would just read from the
buffer instead of the serial itself. In the case of a sysrq key coming
in, the IRQ_NODELAY handler would handle it.
Just a thought. Maybe someday I can get time to play more with this idea,
or someone else can come up with one. But to convert the entire handler
into nodelay is a bit extreme.
-- Steve
-
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/