diff options
| author | Tejun Heo <tj@kernel.org> | 2026-08-15 13:08:28 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-08-15 16:07:49 -1000 |
| commit | f7b6d128dd49a6eec09066ecfd29095f12588786 (patch) | |
| tree | 5887c4c3c725f28e72e4054e3622f8c28f8b297b /include/linux | |
| parent | c384ab8a0b13741982669790a36a152acb2ede82 (diff) | |
sched_ext: Fix inverted ops.core_sched_before() invocation
scx_prio_less() implements prio_less() semantics - %true means that @a is
the lower priority and should run after @b. ops.core_sched_before() is
documented to return %true when @a should run before @b. scx_prio_less()
returns the op's value as-is, inverting the documented semantics at runtime.
Call the op with the arguments swapped.
scx_qmap followed the wiring instead of the documentation and returned %true
for the younger task, so the two inversions canceled out and it behaved as
intended. Flip its comparison to match. scx_qmap is likely the only current
user in or out of the kernel tree. Any scheduler written the same way needs
the same flip, while schedulers following the documentation are fixed by
this change.
Fixes: 7b0888b7cc19 ("sched_ext: Implement core-sched support")
Cc: stable@vger.kernel.org # v6.12+
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
