Commit cd014492 authored by Tejun Heo's avatar Tejun Heo

sched_ext: Add scx_enabled() test to @start_class promotion in put_prev_task_balance()

SCX needs its balance() invoked even when waking up from a lower priority
sched class (idle) and put_prev_task_balance() thus has the logic to promote
@start_class if it's lower than ext_sched_class. This is only needed when
SCX is enabled. Add scx_enabled() test to avoid unnecessary overhead when
SCX is disabled.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Suggested-by: default avatarPeter Zijlstra <peterz@infradead.org>
Acked-by: default avatarDavid Vernet <void@manifault.com>
parent 11cc374f
...@@ -5867,7 +5867,7 @@ static void put_prev_task_balance(struct rq *rq, struct task_struct *prev, ...@@ -5867,7 +5867,7 @@ static void put_prev_task_balance(struct rq *rq, struct task_struct *prev,
* when waking up from SCHED_IDLE. If @start_class is below SCX, start * when waking up from SCHED_IDLE. If @start_class is below SCX, start
* from SCX instead. * from SCX instead.
*/ */
if (sched_class_above(&ext_sched_class, start_class)) if (scx_enabled() && sched_class_above(&ext_sched_class, start_class))
start_class = &ext_sched_class; start_class = &ext_sched_class;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment