• Tejun Heo's avatar
    sched_ext: Improve error reporting during loading · cc9877fb
    Tejun Heo authored
    When the BPF scheduler fails, ops.exit() allows rich error reporting through
    scx_exit_info. Use scx.exit() path consistently for all failures which can
    be caused by the BPF scheduler:
    
    - scx_ops_error() is called after ops.init() and ops.cgroup_init() failure
      to record error information.
    
    - ops.init_task() failure now uses scx_ops_error() instead of pr_err().
    
    - The err_disable path updated to automatically trigger scx_ops_error() to
      cover cases that the error message hasn't already been generated and
      always return 0 indicating init success so that the error is reported
      through ops.exit().
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Cc: David Vernet <void@manifault.com>
    Cc: Daniel Hodges <hodges.daniel.scott@gmail.com>
    Cc: Changwoo Min <multics69@gmail.com>
    Cc: Andrea Righi <andrea.righi@linux.dev>
    Cc: Dan Schatzberg <schatzberg.dan@gmail.com>
    cc9877fb
ext.c 204 KB