mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Thomas Pfaff <tpfaff@pcs.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: Fix async io write notifications
Date: Mon, 24 Nov 2008 14:21:28 +0000	[thread overview]
Message-ID: <20081124142128.11cb3d06@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.64.0811241401280.8443@lxtpfaff.pcs.ditec.de>

On Mon, 24 Nov 2008 14:40:15 +0100 (CET)
Thomas Pfaff <tpfaff@pcs.com> wrote:

> he N_TTY ldisc layer does not send SIGIO POLL_OUTs correctly when output is 
> possible due to flawed handling of the TTY_DO_WRITE_WAKEUP bit. It will either 
> send no SIGIOs at all or on every tty wakeup.
> 
> The fix is to set the bit when the tty driver write would block and test and 
> clear it on write wakeup.
> 
> Signed-off-by: Thomas Pfaff <tpfaff@pcs.com>

I had done a patch already but yours is somewhat nicer so I've merged
yours instead with some tweaks as it clashed with an existing N_TTY patch

I left the tty->fasync check in the if (in case the user clears async I/O
events) and I reversed the tests on the end of n_tty_write simply
because the compiler has the variables we need to check to hand but not
tty->fasync.

This all looks good to me. It breaks on ptys but that is another bug and
I'll merge a patch to fix the ptys next.

Alan

      reply	other threads:[~2008-11-24 14:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 13:40 Thomas Pfaff
2008-11-24 14:21 ` Alan Cox [this message]

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=20081124142128.11cb3d06@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tpfaff@pcs.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

all inboxes | Powered by JetHome®