User: Password:
Subscribe / Log in / New account

A tempest in a tty pot

A tempest in a tty pot

Posted Jul 29, 2009 23:40 UTC (Wed) by nowster (subscriber, #67)
Parent article: A tempest in a tty pot

Just in:

commit e043e42bdb66885b3ac10d27a01ccb9972e2b0a3
Author: OGAWA Hirofumi <>
Date:   Wed Jul 29 12:15:56 2009 -0700

    pty: avoid forcing 'low_latency' tty flag

    We really don't want to mark the pty as a low-latency device, because as
    Alan points out, the ->write method can be called from an IRQ (ppp?),
    and that means we can't use ->low_latency=1 as we take mutexes in the
    low_latency case.

    So rather than using low_latency to force the written data to be pushed
    to the ldisc handling at 'write()' time, just make the reader side (or
    the poll function) do the flush when it checks whether there is data to
    be had.

    This also fixes the problem with lost data in an emacs compile buffer
    (bugzilla 13815), and we can thus revert the low_latency pty hack
    (commit 3a54297478e6578f96fd54bf4daa1751130aca86: "pty: quickfix for the
    pty ENXIO timing problems").

    Signed-off-by: OGAWA Hirofumi <>
    Tested-by: Aneesh Kumar K.V <>
    [ Modified to do the tty_flush_to_ldisc() inside input_available_p() so
      that it triggers for both read and poll()  - Linus]
    Signed-off-by: Linus Torvalds <>

(Log in to post comments)

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds