I'm thinking we should periodically rebalance tasks between cores.
This will avoid situations where certain cores end up heavily loaded and there's nothing being done about it, and will also make the race conditions in initial core selection (on new task scheduling) a thing we don't really have to care too much about.
Haven't thought too deeply on this one. Initial thoughts:
- Idle tasks could handle this?
- Maybe by kicking off a kernel thread every once in a while that looks at the queues
- But in a heavily-loaded system, the idle tasks might never get chance...
- Don't do too regularly, it'll increase lock contention obvs
I'm thinking we should periodically rebalance tasks between cores.
This will avoid situations where certain cores end up heavily loaded and there's nothing being done about it, and will also make the race conditions in initial core selection (on new task scheduling) a thing we don't really have to care too much about.
Haven't thought too deeply on this one. Initial thoughts: