]> git.baikalelectronics.ru Git - kernel.git/commit
n_tty: Special case pty flow control
authorPeter Hurley <peter@hurleysoftware.com>
Tue, 23 Jul 2013 12:47:30 +0000 (08:47 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:43:03 +0000 (16:43 -0700)
commit1912bd086bfc03dcb874f43d451816b29907f34c
tree958d6da99e73bf1834492b2ab17702087126abc0
parent485d9e6cd07d34fbfcbbe49c51048933c677d0c7
n_tty: Special case pty flow control

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: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c