• Peter Hurley's avatar
    n_tty: Special case pty flow control · 3afb1b39
    Peter Hurley authored
    The pty driver forces ldisc flow control on, regardless of available
    receive buffer space, so the writer can be woken whenever unthrottle
    is called. However, this 'forced throttle' has performance
    consequences, as multiple atomic operations are necessary to
    unthrottle and perform the write wakeup for every input line (in
    canonical mode).
    
    Instead, short-circuit the unthrottle if the tty is a pty and perform
    the write wakeup directly.
    Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    3afb1b39
n_tty.c 58.1 KB