]> git.ipfire.org Git - thirdparty/linux.git/commit
sched_ext: Add SCX_EFLAG_INITIALIZED to indicate successful ops.init()
authorTejun Heo <tj@kernel.org>
Tue, 23 Sep 2025 19:03:26 +0000 (09:03 -1000)
committerTejun Heo <tj@kernel.org>
Tue, 23 Sep 2025 19:03:26 +0000 (09:03 -1000)
commitf3aec2adce8dbe37dabff47a16bfb260b987e0b0
tree3a8d9a13b4c295614a7685d679651eb6cd41e34e
parentc7e739746dbde9ae401fd88824f5656c5e2361fc
sched_ext: Add SCX_EFLAG_INITIALIZED to indicate successful ops.init()

ops.exit() may be called even if the loading failed before ops.init()
finishes successfully. This is because ops.exit() allows rich exit info
communication. Add SCX_EFLAG_INITIALIZED flag to scx_exit_info.flags to
indicate whether ops.init() finished successfully.

This enables BPF schedulers to distinguish between exit scenarios and
handle cleanup appropriately based on initialization state.

Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c
kernel/sched/ext_internal.h