-
Notifications
You must be signed in to change notification settings - Fork 996
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
At the time of writing, the scheduler works as the following loop:
- check the time
- if the front of the timer queue has already passed, then push the goroutine to the back of the scheduler queue
- take the next task on the runqueue
- if it is nil, go to sleep and ask for a wakeup; if it is non-nil, run it
This model was built before interrupts were part of the scheduler, and so incorporating interrupts is difficult. At the bare minimum, the timing code needs to be able to return early in case of interrupt so that interrupts can be handled properly.
Our current scheduler also has a few other issues:
- When handling large amounts of small events, we spam-check the timer. On some platforms this is very fast, while on others like embedded Linux it can become a bottleneck.
- Timing is tightly coupled to the scheduler, which may make it more difficult to make modifications.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request