Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1290678

Re: [PATCH 5/6] n_tty: Fix stuck write wakeup

From Johannes Stezenbach <js@sig21.net>
Newsgroups linux.kernel
Subject Re: [PATCH 5/6] n_tty: Fix stuck write wakeup
Date 2015-12-13 20:30 +0100
Message-ID <qFkvf-433-3@gated-at.bofh.it> (permalink)
References <qF0Gd-8bC-3@gated-at.bofh.it> <qF0Gd-8bC-1@gated-at.bofh.it> <qFgBk-1zr-11@gated-at.bofh.it> <qFjIS-3wq-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Dec 13, 2015 at 10:38:02AM -0800, Peter Hurley wrote:
> On 12/13/2015 07:18 AM, Johannes Stezenbach wrote:
> > 
> > There is a related bug that I meant to send a patch, but I
> > never got around because the issue was found with proprietary
> > userspace and ancient kernel.  Maybe you could take care of it?
> > The patch might not apply cleanly after your recent changes
> > or might even be invalid now, please check.
> 
> Thanks for the patch, Johannes!
> 
> Yes, the patch below is still required to prevent excessive SIGIO
> (and to prevent missed SIGIO when the amount actually copied just
> happens to be exactly the amount left to be copied).
> 
> I made some comments in the patch; can you re-submit with those
> changes and the patch title in the subject? Or I'd happy to re-work
> it and send it to Greg if you'd prefer; just let me know.

Please rework it, currently I'm in lazy bum mode ;-)

> > @@ -1991,7 +1992,7 @@ static ssize_t n_tty_write(struct tty_st
> >  break_out:
> >         __set_current_state(TASK_RUNNING);
> >         remove_wait_queue(&tty->write_wait, &wait);
> > -       if (b - buf != nr && tty->fasync)
> > +       if (b - buf != count && tty->fasync)
> 
> ... this can be
> 
> 	if (nr && tty->fasync)
> 		set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);

Yeah, that's way better.

Thanks,
Johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 5/6] n_tty: Fix stuck write wakeup Peter Hurley <peter@hurleysoftware.com> - 2015-12-12 23:20 +0100
  Re: [PATCH 5/6] n_tty: Fix stuck write wakeup Johannes Stezenbach <js@sig21.net> - 2015-12-13 16:20 +0100
    Re: [PATCH 5/6] n_tty: Fix stuck write wakeup Peter Hurley <peter@hurleysoftware.com> - 2015-12-13 19:40 +0100
      Re: [PATCH 5/6] n_tty: Fix stuck write wakeup Johannes Stezenbach <js@sig21.net> - 2015-12-13 20:30 +0100

csiph-web