Repository navigation
perf(console): reduce kernel logging and make COM1 output asynchronous - #39
Merged
Merged
Conversation
Filter routine DEBUG messages by default and use consistent severity and component labels. Queue runtime serial output for IRQ-driven FIFO writes, with timer fallback, shutdown drain, and an emergency polling path.
Use the current serial source in the driver manager fixture and model the absent COM1 hooks in the PS/2 IRQ tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
问题与效果
常规进程操作会产生日志,同步等待 UART 发送会拖慢命令启动和并发任务。默认关闭高频 DEBUG 日志,进入用户态后由串口中断批量发送常规输出。
流程与实现
[启动后秒数] [等级] [组件] 消息格式。debug或loglevel=8可开启进程和设备诊断,log=none可关闭常规日志。/dev/ttyS0保留阻塞写和非阻塞背压,关机尝试排空,panic 保留直接输出。验证
make test-ownership test-host-smoke test-tools通过,宿主机回归 17 组通过。CONFIG_SERIAL_8250=m配置下的serial.ko。中、英、日三版文档构建通过。python3 tools/test_console.py -v的三项测试通过。VGA 和 panic 定向测试通过。test_syscall_io.py与test_linux_descriptors.py的宿主链接在基线和变更版均失败。/dev/ttyS0完整传输 192 KiB 后正常关机,BIOS 镜像在log=none下仍可输出 panic。fork+exec。动态可执行文件单次平均耗时由 8.17 ms 降至 0.71 ms,捕获到的串口字节数减少约 98.6%。