DragonOS-Community / DragonOS

使用Rust从0自研内核,具有Linux兼容性的操作系统,面向云计算轻量化场景而设计。DragonOS is an operating system developed from scratch using Rust, with Linux compatibility. It is designed for lightweight cloud computing scenarios.
https://dragonos.org
GNU General Public License v2.0
817 stars 132 forks source link

fix(driver/apic_timer): 修复local apic timer初始化顺序导致的在某些云服务器上无法收到中断的bug #815

Closed fslongjin closed 1 month ago

fslongjin commented 1 month ago

由于原先apic timer初始化的时候,先设置初始计数,然后才设置lvt,这导致在某些处理器上收不到apic timer的中断,从而没法调度。

经测试,本PR使得DragonOS在腾讯云的以下机型能够正常执行调度:

image

注:由于云服务器上面pci驱动找不到mcfg表,导致无法正常初始化pci,因此上述截图是把pci初始化、磁盘驱动初始化注释掉,并且loop{}死循环在pid=1的内核线程的结果。符合预期。

dragonosbot commented 1 month ago

r? @GnoCiYeH

dragonosbot has assigned @GnoCiYeH. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer