mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
When switching a task's sched_class away from sched_ext, we get the
following sequence of events in __sched_setscheduler():
sched_change_begin()
switched_from_scx()
scx_disable_task(p)
ops.disable(p)
__setscheduler_params()
set_load_weight()
reweight_task_scx(p)
ops.set_weight(p)
p->sched_class = next_class;
sched_change_end()
...
Notably, ops.set_weight() is called _after_ ops.disable().
This violates the expected semantics of the callbacks, the expectation
being that ops.disable() can only be followed by ops.exit_task() or
ops.enable().
Skipping the weight adjustment for disabled tasks should be harmless
since the weight will be recalculated in scx_enable_task() if the task
ever rejoins SCX.
Fixes:
|
||
|---|---|---|
| .. | ||
| arena.c | ||
| arena.h | ||
| cid.c | ||
| cid.h | ||
| ext.c | ||
| ext.h | ||
| idle.c | ||
| idle.h | ||
| internal.h | ||
| types.h | ||