From: Andrew Morton <akpm@linux-foundation.org>
To: Timur Tabi <timur@freescale.com>
Cc: amit.shah@redhat.com, linuxppc-dev@ozlabs.org,
kumar.gala@freescale.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hvc_console: fix dropping of characters when output byte channel is full
Date: Tue, 14 Sep 2010 12:17:21 -0700 [thread overview]
Message-ID: <20100914121721.c8671ed8.akpm@linux-foundation.org> (raw)
In-Reply-To: <1282329921-24394-1-git-send-email-timur@freescale.com>
On Fri, 20 Aug 2010 13:45:21 -0500
Timur Tabi <timur@freescale.com> wrote:
> hvc_console_print() calls the HVC client driver's put_chars() callback
> to write some characters to the console. If the callback returns 0, that
> indicates that no characters were written (perhaps the output buffer is
> full), but hvc_console_print() treats that as an error and discards the
> rest of the buffer.
>
> So change hvc_console_print() to just loop and call put_chars() again if it
> returns a 0 return code.
Seems rather dangerous. The upper layer will sit there chewing 100%
CPU for as long as the lower layer is congested.
> This change makes hvc_console_print() behave more like hvc_push(), which
> does check for a 0 return code and re-schedules itself.
Yes, hvc_push() reschedules. It doesn't sit in a tight loop burning
electrons!
Can we do something safer&smarter here?
next prev parent reply other threads:[~2010-09-14 19:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-20 18:45 [PATCH] hvc_console: fix dropping of characters when output byte channel is full Timur Tabi
2010-09-14 16:05 ` Timur Tabi
2010-09-14 19:17 ` Andrew Morton [this message]
2010-09-14 19:22 ` Scott Wood
2010-09-14 19:44 ` Alan Cox
2010-09-14 19:25 ` Timur Tabi
2010-09-14 19:52 ` Alan Cox
2010-09-14 19:44 ` Timur Tabi
2010-09-14 20:05 ` Scott Wood
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=20100914121721.c8671ed8.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=amit.shah@redhat.com \
--cc=kumar.gala@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=timur@freescale.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).