All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	brueckner@linux.vnet.ibm.com, Timur Tabi <timur@freescale.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] hvc_console: returning 0 from put_chars is not an error
Date: Fri, 16 Oct 2009 15:46:45 +1100	[thread overview]
Message-ID: <1255668405.19032.13.camel@pasglop> (raw)
In-Reply-To: <4AD770A9.6070509@freescale.com>

On Thu, 2009-10-15 at 13:57 -0500, Scott Wood wrote:
> I'd say the dropping approach is quite undesirable (significant 
> potential for output loss unless the buffer is huge), unless there's 
> simply no way to safely spin.  Hopefully there are no such backends, but 
> if there are perhaps we can have them return some special code to 
> indicate that.

Should never spin. Best is to keep a copy in the upper layer of the
pending data and throttle (not accept further data from tty layer) until
we have managed to flush out that "pending" buffer.

> > If we just busy loop, it actually does not matter how we let hvc_console react 
> > on 0, as long as we adopt all backends to use that interface consistent.
> > 
> > On the other hand, backends might want to do special magic on congestion so I 
> > personally tend to let the backend loop instead of hvc_console. But I am really  
> > not sure.
> 
> Doing it in the backend requires the backend to know whether it's being 
> called for printk or for user I/O.  In the latter case, we don't want to 
> spin, but rather wait for an IRQ (or poll with a timer if there's no IRQ). 

Ben.

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Scott Wood <scottwood@freescale.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
	linuxppc-dev@ozlabs.org, brueckner@linux.vnet.ibm.com,
	Timur Tabi <timur@freescale.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hvc_console: returning 0 from put_chars is not an error
Date: Fri, 16 Oct 2009 15:46:45 +1100	[thread overview]
Message-ID: <1255668405.19032.13.camel@pasglop> (raw)
In-Reply-To: <4AD770A9.6070509@freescale.com>

On Thu, 2009-10-15 at 13:57 -0500, Scott Wood wrote:
> I'd say the dropping approach is quite undesirable (significant 
> potential for output loss unless the buffer is huge), unless there's 
> simply no way to safely spin.  Hopefully there are no such backends, but 
> if there are perhaps we can have them return some special code to 
> indicate that.

Should never spin. Best is to keep a copy in the upper layer of the
pending data and throttle (not accept further data from tty layer) until
we have managed to flush out that "pending" buffer.

> > If we just busy loop, it actually does not matter how we let hvc_console react 
> > on 0, as long as we adopt all backends to use that interface consistent.
> > 
> > On the other hand, backends might want to do special magic on congestion so I 
> > personally tend to let the backend loop instead of hvc_console. But I am really  
> > not sure.
> 
> Doing it in the backend requires the backend to know whether it's being 
> called for printk or for user I/O.  In the latter case, we don't want to 
> spin, but rather wait for an IRQ (or poll with a timer if there's no IRQ). 

Ben.



  parent reply	other threads:[~2009-10-16  4:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14 21:53 [PATCH] hvc_console: returning 0 from put_chars is not an error Timur Tabi
2009-10-15 11:05 ` Christian Borntraeger
2009-10-15 11:05   ` Christian Borntraeger
2009-10-15 16:09   ` Scott Wood
2009-10-15 16:09     ` Scott Wood
2009-10-15 18:41     ` Christian Borntraeger
2009-10-15 18:41       ` Christian Borntraeger
2009-10-15 18:55       ` Timur Tabi
2009-10-15 18:55         ` Timur Tabi
2009-10-15 18:57       ` Scott Wood
2009-10-15 18:57         ` Scott Wood
2009-10-15 19:26         ` Christian Borntraeger
2009-10-15 19:26           ` Christian Borntraeger
2009-10-15 19:32           ` Scott Wood
2009-10-16  8:49             ` Hendrik Brueckner
2009-10-16  8:49               ` Hendrik Brueckner
2009-10-17 23:17               ` Timur Tabi
2009-10-16  4:46         ` Benjamin Herrenschmidt [this message]
2009-10-16  4:46           ` Benjamin Herrenschmidt
2009-10-16 15:33           ` Scott Wood
2009-10-16 15:33             ` Scott Wood
2009-10-16 18:03             ` Benjamin Herrenschmidt
2009-10-16 18:03               ` Benjamin Herrenschmidt

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=1255668405.19032.13.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=borntraeger@de.ibm.com \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.com \
    --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 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.