Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

scx: Improve error reporting after an early scx_bpf_error() #150

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

htejun
Copy link
Collaborator

@htejun htejun commented Feb 28, 2024

If scx_bpf_error() is triggered while a BPF scheduler is being loaded, depending on the point of failure, it can make ops_state transition fail and thus make loading fail with -EBUSY, which isn't very descriptive.

There was already a workaround for a specific case where ops.init() triggers scx_bpf_error() which works by just reporting success so that the usual exit path report the error with all the details.

There's no reason to restrict this to ops.init() failure. These early scx_bpf_error()s always make the ops_state transitions fail and we can always finish loading with success and let the exit path report the faliure.

If scx_bpf_error() is triggered while a BPF scheduler is being loaded,
depending on the point of failure, it can make ops_state transition fail and
thus make loading fail with -EBUSY, which isn't very descriptive.

There was already a workaround for a specific case where ops.init() triggers
scx_bpf_error() which works by just reporting success so that the usual exit
path report the error with all the details.

There's no reason to restrict this to ops.init() failure. These early
scx_bpf_error()s always make the ops_state transitions fail and we can
always finish loading with success and let the exit path report the faliure.
Copy link

@jordalgo jordalgo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment nit but LGTM otherwise

kernel/sched/ext.c Show resolved Hide resolved
kernel/sched/ext.c Show resolved Hide resolved
@Byte-Lab Byte-Lab merged commit 0accda1 into sched_ext Feb 28, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants