From: Dave Jones <davej@redhat.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: tickle nmi watchdog whilst doing serial writes.
Date: Fri, 13 May 2005 15:23:28 -0400 [thread overview]
Message-ID: <20050513192328.GB24166@redhat.com> (raw)
In-Reply-To: <1116011692.6694.19.camel@laptopd505.fenrus.org>
On Fri, May 13, 2005 at 09:14:52PM +0200, Arjan van de Ven wrote:
> On Fri, 2005-05-13 at 14:48 -0400, Dave Jones wrote:
> > if (up->port.flags & UPF_CONS_FLOW) {
> > tmout = 1000000;
> > while (--tmout &&
> > - ((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0))
> > + ((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0)) {
> > udelay(1);
> > + touch_nmi_watchdog();
> > + }
> > }
> > }
> >
> >
> > We *could* tickle it less often, but given we're busy waiting anyway
> > it probably doesnt make sense to not favour the more simple approach.
> > Hmm, maybe we want a cpu_relax() in there too. opinions?
>
> udelay() includes cpu_relax() already so that is futile.
>
> However.. this is a hack. Do we really need to do busy waiting here for
> this long??
Ohhhhh no. I've fallen into this trap before.
I'm not looking any further into serial code than I have to :)
Russell / dwmw2 may have a more definitive answers as to why
we have such a long wait here, but every time I learn something
about the serial layer I end up regretting it, so mine is a
drive-by patching only :-)
Dave
next prev parent reply other threads:[~2005-05-13 19:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-13 18:48 tickle nmi watchdog whilst doing serial writes Dave Jones
2005-05-13 19:14 ` Arjan van de Ven
2005-05-13 19:23 ` Dave Jones [this message]
2005-05-13 19:37 ` Russell King
2005-05-14 6:43 ` Andrew Morton
2005-05-14 6:57 ` Dave Jones
2005-05-14 7:07 ` Andrew Morton
2005-05-14 10:31 ` Ed Tomlinson
2005-05-14 10:53 ` Alexander Nyberg
2005-05-15 11:40 ` Andi Kleen
2005-05-14 10:53 ` Ed Tomlinson
2005-05-15 11:38 ` Andi Kleen
2005-05-15 12:07 ` Russell King
2005-05-15 12:20 ` Andi Kleen
2005-05-15 14:01 ` Russell King
2005-05-15 14:03 ` Andi Kleen
2005-05-19 0:24 ` George Anzinger
2005-05-19 7:33 ` Russell King
2005-05-23 20:20 ` Bill Davidsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050513192328.GB24166@redhat.com \
--to=davej@redhat.com \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.