Re: [PATCH sched_ext/for-6.12-fixes] sched_ext: Improve error reporting during loading

From: Tejun Heo
Date: Fri Oct 04 2024 - 16:49:37 EST


On Wed, Oct 02, 2024 at 10:33:37AM -1000, Tejun Heo wrote:
> 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@xxxxxxxxxx>
> Cc: David Vernet <void@xxxxxxxxxxxxx>
> Cc: Daniel Hodges <hodges.daniel.scott@xxxxxxxxx>
> Cc: Changwoo Min <multics69@xxxxxxxxx>
> Cc: Andrea Righi <andrea.righi@xxxxxxxxx>
> Cc: Dan Schatzberg <schatzberg.dan@xxxxxxxxx>

Applied to sched_ext/for-6.12-fixes.

Thanks.

--
tejun