Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Tejun Heo <tj@kernel.org>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: David Vernet <void@manifault.com>

+1 -1
+1 -1
kernel/sched/core.c
··· 5867 5867 * when waking up from SCHED_IDLE. If @start_class is below SCX, start 5868 5868 * from SCX instead. 5869 5869 */ 5870 - if (sched_class_above(&ext_sched_class, start_class)) 5870 + if (scx_enabled() && sched_class_above(&ext_sched_class, start_class)) 5871 5871 start_class = &ext_sched_class; 5872 5872 #endif 5873 5873