Bug #10589
closedwscons: slow console oputput will trigger keyboard autorepeat
100%
Description
wscons is STREAMS multiplexor driver binding together console input and output devices. The current implementation of wc module is done in a way that wc does call console draw directly (tem_write or console_puts() or prom_mayput(), while console_puts() and prom_mayput() are used from separate thread, the tem_write() is called from the same context as the keyboard event does happen (due to putnext() calls), that context is keyboard interrupt context.
If the screen update is slow, the keyboard autorepeat mechanism will kick in (the kbtrans module) and the generated keyboard evens will cause additional console output till in worst case, we have system overload.
To solve this issue, we need to use the feature of STREAMS mechanism to make queue processing to happen in parallel, we need to implement screen update calls from upper write queue service call, which is scheduled by STREAMS scheduler. This does also allow us to simplify the SPARC side, but due to lack of resources, I can not go too deep there.
Testing done: verified the output on console, ctrl-s/ctrl-q, activation and functioning kmdb via F1-a. Used format command which previously did trigger the keyboard autorepeat spam.
SPARC side was tested by Peter. x86 version tested on Dell Latitude 7370 + supermicro X10SAE + VM's.
Updated by Electric Monk over 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit d4a54bf774f1986f61246b1ae5d84a724df14396
commit d4a54bf774f1986f61246b1ae5d84a724df14396 Author: Toomas Soome <tsoome@me.com> Date: 2019-04-19T20:27:09.000Z 10589 wscons: slow console oputput will trigger keyboard autorepeat Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: Peter Tribble <peter.tribble@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>