[kernel] Speed up TTY output processing #1709
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tested on QEMU, this increases
sl
output by 25-50% on already fast systems. Discussed in #1619 (comment).It seems @Vutshi has a knack for finding deep rabbit holes. Using the operation of
sl
, testing has found that the output speed varies considerably, based on something I can't pinpoint. I've looked at the scheduler, kernel timers, serial console, and all seem operating correctly. What is being observed is that (especially with this enhancement)sl
runs fast ~0.45 seconds on QEMU on boot (from ~0.73s - 1.0s before). But after running networking, then stopping it, or running /bin/getty on a serial line, then stopping it, or even just typing ^D a few times to login: on serial, thesl
output time increases 50% to 0.73s or more, then sometimes drops back to speedy again.This needs testing on real hardware - I'm very interested to learn how much quicker this change gets us, as well as any slowdowns seen when
init 3
is run opening a /bin/getty on /dev/ttyS0.