linux/drivers/tty
Linus Torvalds 81de916f19 tty_buffer: get rid of 'seen_tail' logic in flush_to_ldisc
The flush_to_ldisc() work entry has special logic to notice when it has
seen the original tail of the data queue, and it avoids continuing the
flush if it sees that _original_ tail rather than the current tail.

This logic can trigger in case somebody is constantly adding new data to
the tty while the flushing is active - and the intent is to avoid
excessive CPU usage while flushing the tty, especially as we used to do
this from a softirq context which made it non-preemptible.

However, since we no longer re-arm the work-queue from within itself
(because that causes other trouble: see commit a5660b41af "tty: fix
endless work loop when the buffer fills up"), this just leads to
possible hung tty's (most easily seen in SMP and with a test-program
that floods a pty with data - nobody seems to have reported this for any
real-life situation yet).

And since the workqueue isn't done from timers and softirq's any more,
it's doubtful whether the CPU useage issue is really relevant any more.
So just remove the logic entirely, and see if anybody ever notices.

Alternatively, we might want to re-introduce the "re-arm the work" for
just this case, but then we'd have to re-introduce the delayed work
model or some explicit timer, which really doesn't seem worth it for
this.

Reported-and-tested-by: Guillaume Chazarain <guichaz@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-08 07:46:30 -07:00
..
hvc Fix common misspellings 2011-03-31 11:26:23 -03:00
ipwireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2011-05-24 13:28:35 -07:00
serial Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-05-27 19:51:32 -07:00
vt Revert "tty: make receive_buf() return the amout of bytes received" 2011-06-04 06:33:24 +09:00
Kconfig n_tracerouter and n_tracesink ldisc additions. 2011-05-13 16:31:00 -07:00
Makefile n_tracerouter and n_tracesink ldisc additions. 2011-05-13 16:31:00 -07:00
amiserial.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
bfin_jtag_comm.c drivers/tty/bfin_jtag_comm.c: avoid calling put_tty_driver on NULL 2011-03-23 19:46:39 -07:00
cyclades.c Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2011-05-26 13:19:00 -07:00
isicom.c tty: move a number of tty drivers from drivers/char/ to drivers/tty/ 2011-02-22 16:14:56 -08:00
moxa.c drivers/tty/moxa.c: Put correct tty value 2011-04-29 14:17:45 -07:00
moxa.h tty: move a number of tty drivers from drivers/char/ to drivers/tty/ 2011-02-22 16:14:56 -08:00
mxser.c tty: move a number of tty drivers from drivers/char/ to drivers/tty/ 2011-02-22 16:14:56 -08:00
mxser.h Fix common misspellings 2011-03-31 11:26:23 -03:00
n_gsm.c Revert "tty: make receive_buf() return the amout of bytes received" 2011-06-04 06:33:24 +09:00
n_hdlc.c Revert "tty: make receive_buf() return the amout of bytes received" 2011-06-04 06:33:24 +09:00
n_r3964.c Revert "tty: make receive_buf() return the amout of bytes received" 2011-06-04 06:33:24 +09:00
n_tracerouter.c n_tracerouter and n_tracesink ldisc additions. 2011-05-13 16:31:00 -07:00
n_tracesink.c n_tracerouter and n_tracesink ldisc additions. 2011-05-13 16:31:00 -07:00
n_tracesink.h n_tracerouter and n_tracesink ldisc additions. 2011-05-13 16:31:00 -07:00
n_tty.c Revert "tty: make receive_buf() return the amout of bytes received" 2011-06-04 06:33:24 +09:00
nozomi.c Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2011-05-26 13:19:00 -07:00
pty.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
rocket.c TTY: rocket, remove unused variables 2011-04-19 14:41:48 -07:00
rocket.h tty: move a number of tty drivers from drivers/char/ to drivers/tty/ 2011-02-22 16:14:56 -08:00
rocket_int.h tty: move a number of tty drivers from drivers/char/ to drivers/tty/ 2011-02-22 16:14:56 -08:00
synclink.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
synclink_gt.c Fix common misspellings 2011-03-31 11:26:23 -03:00
synclinkmp.c Fix common misspellings 2011-03-31 11:26:23 -03:00
sysrq.c lib, arch: add filter argument to show_mem and fix private implementations 2011-03-24 17:49:37 -07:00
tty_audit.c tty_audit: fix tty_audit_add_data live lock on audit disabled 2011-03-07 12:04:50 -08:00
tty_buffer.c tty_buffer: get rid of 'seen_tail' logic in flush_to_ldisc 2011-06-08 07:46:30 -07:00
tty_io.c TTY: tty_io, annotate locking functions 2011-04-25 14:19:12 -07:00
tty_ioctl.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-05-23 12:23:20 -07:00
tty_ldisc.c TTY: introduce deinit helpers for proper ldisc shutdown 2011-04-19 14:43:01 -07:00
tty_mutex.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
tty_port.c