sched_ext: Improve error reporting during loading
authorTejun Heo <tj@kernel.org>
Wed, 2 Oct 2024 20:33:37 +0000 (10:33 -1000)
committerTejun Heo <tj@kernel.org>
Fri, 4 Oct 2024 20:11:43 +0000 (10:11 -1000)
commitcc9877fb76771b7cbce6c9ec239f13a1d7759876
treeb1354d02dc9414e978387d08b00c77a02d088355
parentfcbc423577ce28b5e470a2a47fed6724430cccdb
sched_ext: Improve error reporting during loading

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: Tejun 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>
kernel/sched/ext.c
This page took 0.044031 seconds and 4 git commands to generate.