Kernel: Don't use peridic interrupts for scheduling

Scheduler will now set a timer interrupt deadline for when it should get
interrupted next. This fixes a big issue I've had for a long time where
sleeping on an idle core would have to wait for the next periodic
interrupt to wake up. This could cause 1 ms sleeps to be close to 10 ms.

This currently only supports lapic timers and will still fallback to
periodic interrupts when running with PIC. I should add deadline support
to PIT/HPET but why would you run with APIC disabled ;)
This commit is contained in:
2026-07-07 04:48:32 +03:00
parent bcf1c6d110
commit 49662aa994
9 changed files with 81 additions and 43 deletions

View File

@@ -15,7 +15,7 @@ asm_yield_trampoline:
pushq %r15
movq %rsp, %rdi
call scheduler_on_yield
call scheduler_on_yield_trampoline
popq %r15
popq %r14