summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2016-01-09 21:45:08 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-28 11:58:02 -0800
commit33d7136336a94feade73b08b9c4bd1420df4e572 (patch)
tree7ed8129336075d0d82880b386bd84298ee8ec7fa /sound
parent55b6314a17e8ad53233e9d0ebf6328734720e93b (diff)
downloadlinux-33d7136336a94feade73b08b9c4bd1420df4e572.tar.bz2
n_tty: Always wake up read()/poll() if new input
A read() in non-canonical mode when VMIN > 0 and VTIME == 0 does not complete until at least VMIN chars have been read (or the user buffer is full). In this infrequent read mode, n_tty_read() attempts to reduce wakeups by computing the amount of data still necessary to complete the read (minimum_to_wake) and only waking the read()/poll() when that much unread data has been processed. This is the only read mode for which new data does not necessarily generate a wakeup. However, this optimization is broken and commonly leads to hung reads even though the necessary amount of data has been received. Since the optimization is of marginal value anyway, just remove the whole thing. This also remedies a race between a concurrent poll() and read() in this mode, where the poll() can reset the minimum_to_wake of the read() (and vice versa). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions