• Tejun Heo's avatar
    sched_ext: Temporarily work around pick_task_scx() being called without balance_scx() · da330f5e
    Tejun Heo authored
    pick_task_scx() must be preceded by balance_scx() but there currently is a
    bug where fair could say yes on balance() but no on pick_task(), which then
    ends up calling pick_task_scx() without preceding balance_scx(). Work around
    by dropping WARN_ON_ONCE() and ignoring cases which don't make sense.
    
    This isn't great and can theoretically lead to stalls. However, for
    switch_all cases, this happens only while a BPF scheduler is being loaded or
    unloaded, and, for partial cases, fair will likely keep triggering this CPU.
    
    This will be reverted once the fair behavior is fixed.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    da330f5e
ext.c 195 KB