Kernel: Change preemption condition
Instead of keeping track of the current time and rescheduling when interval has passed, keep track of the next expected reschedule time. This prevents theoretically missing every second pre-emption when scheduler's timer is interrupting at same rate as the interval.
This commit is contained in:
@@ -101,7 +101,7 @@ namespace Kernel
|
||||
InterruptStack* m_interrupt_stack { nullptr };
|
||||
InterruptRegisters* m_interrupt_registers { nullptr };
|
||||
|
||||
uint64_t m_last_reschedule_ns { 0 };
|
||||
uint64_t m_next_reschedule_ns { 0 };
|
||||
uint64_t m_last_load_balance_ns { 0 };
|
||||
|
||||
struct ThreadInfo
|
||||
|
||||
Reference in New Issue
Block a user