linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Grant Edwards <grant.b.edwards@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: tty_flip_buffer() from atomic context when low_latency==1
Date: Fri, 19 Aug 2011 21:24:16 +0100	[thread overview]
Message-ID: <20110819212416.6f626852@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <j2med6$q2r$1@dough.gmane.org>

> But, many drivers appear to call tty_flip_buffer_push() from an atomic
> context. If that is done with tty->low_latency==1 it turns into a call
> to flush_to_ldisc(), which then calls disc->ops->receive_buf(), which
> must not be called from an atomic context.

It's covered under "So don't do that then".

> Is the low_latency flag being forced to 0 somewhere behind the scenes
> when tty_flip_buffer_push() is being called from an atomic context?

No. The driver authors are assumed to have a modicum of competence and if
they don't usually a shower of lock debug messages enlightens
appropriately.

Alan

  reply	other threads:[~2011-08-19 20:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19 19:43 tty_flip_buffer() from atomic context when low_latency==1 Grant Edwards
2011-08-19 20:24 ` Alan Cox [this message]
2011-08-19 20:44   ` Grant Edwards
2011-08-19 21:06     ` Alan Cox
2011-08-19 21:24       ` Grant Edwards
2011-08-19 21:31         ` Alan Cox
2011-08-19 21:52           ` Grant Edwards
2011-08-19 22:53             ` Alan Cox

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=20110819212416.6f626852@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=grant.b.edwards@gmail.com \
    --cc=linux-serial@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 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).