[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100914142236.64547ec3@schlenkerla.am.freescale.net>
Date: Tue, 14 Sep 2010 14:22:36 -0500
From: Scott Wood <scottwood@...escale.com>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: Timur Tabi <timur@...escale.com>, amit.shah@...hat.com,
linuxppc-dev@...abs.org, kumar.gala@...escale.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hvc_console: fix dropping of characters when output
byte channel is full
On Tue, 14 Sep 2010 12:17:21 -0700
Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Fri, 20 Aug 2010 13:45:21 -0500
> Timur Tabi <timur@...escale.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 is just for printk(), not user output. This is exactly what
printk() has always done for real serial ports.
> > 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.
hvc_push() is not relevant to kernel console output.
hvc_console_write() currently does not reschedule anything. It just
drops characters when busy.
-Scott
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists