]> 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)
commita5d2ff893a366f32479b673fb201712aa98dca9b
tree958d6da99e73bf1834492b2ab17702087126abc0
parent0c4582a2e09af2121a6da4c5417b7fccc764097c
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