lkml.org 
[lkml]   [2006]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tickle NMI watchdog on serial output.
http://newsvote.bbc.co.uk/mpapps/pagetools/print/news.bbc.co.uk/2/hi/health/5232150.stmDave
Jones wrote:
> Serial is _slow_ sometimes. So slow, that the NMI watchdog kicks in.


> I initially did the patch below a year ago for the Fedora kernel, and have
> been keeping it up to date since. I recently got the same thing happening
> on a vanilla kernel, so figured it was time to repost this.

Hopefully this will get picked up for mainline. In case of a real hung
it should still trigger NMI in some reasonable time.
>
> Signed-off-by: Dave Jones <davej@redhat.com>
>
> --- linux-2.6/drivers/serial/8250.c~ 2005-05-14 02:49:02.000000000 -0400
> +++ linux-2.6/drivers/serial/8250.c 2005-05-14 02:54:30.000000000 -0400
> @@ -2098,9 +2098,11 @@ static inline void wait_for_xmitr(struct
> /* Wait up to 1s for flow control if necessary */
> if (up->port.flags & UPF_CONS_FLOW) {
> tmout = 1000000;
> - while (--tmout &&
> - ((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0))
> + while (!(serial_in(up, UART_MSR) & UART_MSR_CTS) && --tmout) {
> udelay(1);
> + if ((tmout % 1000) == 0)
> + touch_nmi_watchdog();
> + }
> }
> }
>
>


--
Bill Davidsen <davidsen@tmr.com>
Obscure bug of 2004: BASH BUFFER OVERFLOW - if bash is being run by a
normal user and is setuid root, with the "vi" line edit mode selected,
and the character set is "big5," an off-by-one errors occurs during
wildcard (glob) expansion.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-01 22:11    [W:0.030 / U:1.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site