freebsd-dev/sys/dev/vt
Jean-Sébastien Pédron 4e5a8fdbff vt(4): Resume vt_timer() in vtterm_post_input() only
There is no need to try to resume it after each smaller operations
(putchar, cursor_position, copy, fill).

The resume function already checks if the timer is armed before doing
anything, but it uses an atomic cmpset which is expensive. And resuming
the timer at the end of input processing is enough.

While here, we also skip timer resume if the input is for another
windows than the currently displayed one. I.e. if `ttyv0` is currently
displayed, any changes to `ttyv1` shouldn't resume the timer (which
would refresh `ttyv0`).

By doing the same benchmark as r333669, I get:
  * vt(4), before r333669:  1500 ms
  * vt(4), with this patch:  760 ms
  * syscons(4):              700 ms
2018-05-16 10:08:50 +00:00
..
colors vt(4): Use default VGA palette 2018-05-10 17:00:33 +00:00
font Update vt(4) "Terminus BSD Console" font to v4.46 2018-04-12 20:21:04 +00:00
hw vt(4): Use default VGA palette 2018-05-10 17:00:33 +00:00
logo sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
vt_buf.c teken, vt(4): New callbacks to lock the terminal once 2018-05-16 09:01:02 +00:00
vt_consolectl.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
vt_core.c vt(4): Resume vt_timer() in vtterm_post_input() only 2018-05-16 10:08:50 +00:00
vt_cpulogos.c vt(4): Resume vt_timer() in vtterm_post_input() only 2018-05-16 10:08:50 +00:00
vt_font.c Limit glyph count in vtfont_load to avoid integer overflow. 2018-04-04 05:21:46 +00:00
vt_sysmouse.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
vt.h vt(4): Resume vt_timer() in vtterm_post_input() only 2018-05-16 10:08:50 +00:00