tmp_suning_uos_patched/drivers/tty
Linus Torvalds a5660b41af tty: fix endless work loop when the buffer fills up
Commit f23eb2b2b2 ('tty: stop using "delayed_work" in the tty layer')
ended up causing hung machines on UP with no preemption, because the
work routine to flip the buffer data to the ldisc would endlessly re-arm
itself if the destination buffer had filled up.

With the delayed work, that only caused a timer-driving polling of the
tty state every timer tick, but without the delay we just ended up with
basically a busy loop instead.

Stop the insane polling, and instead make the code that opens up the
receive room re-schedule the buffer flip work.  That's what we should
have been doing anyway.

This same "poll for tty room" issue is almost certainly also the cause
of excessive kworker activity when idle reported by Dave Jones, who also
reported "flush_to_ldisc executing 2500 times a second" back in Nov 2010:

  http://lkml.org/lkml/2010/11/30/592

which is that silly flushing done every timer tick.  Wasting both power
and CPU for no good reason.

Reported-and-tested-by: Alexander Beregalov <a.beregalov@gmail.com>
Reported-and-tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Cc: Greg KH <gregkh@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-04 14:26:54 -07:00
..
hvc drivers: Final irq namespace conversion 2011-03-29 14:48:19 +02:00
ipwireless
serial apbuart: Depend upon sparc. 2011-03-30 21:12:24 -07:00
vt
amiserial.c
bfin_jtag_comm.c
cyclades.c
isicom.c
Kconfig
Makefile
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c
n_hdlc.c
n_r3964.c
n_tty.c tty: fix endless work loop when the buffer fills up 2011-04-04 14:26:54 -07:00
nozomi.c
pty.c
rocket_int.h
rocket.c
rocket.h
synclink_gt.c
synclink.c
synclinkmp.c
sysrq.c
tty_audit.c
tty_buffer.c tty: fix endless work loop when the buffer fills up 2011-04-04 14:26:54 -07:00
tty_io.c
tty_ioctl.c
tty_ldisc.c
tty_mutex.c
tty_port.c