RFC sched: balance callbacks
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest7 patches 18 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | sched: Replace post_schedule with a balance callback listkernel/ kernel/ kernel/ +1 more | +62 | 6 replies | |
| 2/7 | sched: Use replace normalize_task() with __sched_setscheduler()kernel/ | +23 | 0 replies | |
| 3/7 | sched: Allow balance callbacks for check_class_changed()kernel/ | +22 | 8 replies | |
| 4/7 | sched,rt: Remove return value from pull_rt_task()kernel/ | +11 | 0 replies | |
| 5/7 | sched,rt: Convert switched_{from,to}_rt() / prio_changed_rt() to balance callbackskernel/ | +19 | 0 replies | |
| 6/7 | sched,dl: Remove return value from pull_dl_task()kernel/ | +10 | 0 replies | |
| 7/7 | sched,dl: Convert switched_{from,to}_dl() / prio_changed_dl() to balance callbackskernel/ | +20 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC][PATCH 0/7] sched: balance callbacks
Hi,
Mike stumbled over a cute bug where the RT/DL balancing ops caused a bug.
The exact scenario is __sched_setscheduler() changing a (runnable) task from FIFO to OTHER. In swiched_from_rt(), where we do pull_rt_task() we temporarity drop rq->lock. This gap allows regular cfs load-balancing to step in and migrate our.
However, check_class_changed() will happily continue with switched_to_fair() which assumes our task is still on the old rq and makes the kernel go boom.
Instead of trying to patch this up and make things complicated; simply disallow these methods to drop rq->lock and extend the current post_schedule stuff into a balancing callback list, and use that.
This survives Mike's testcase for well over an hour on my ivb-ep. I've not yet tested it on anything bigger.