Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scx_rustland_core: avoid critical failures due by missing task context #605

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

arighi
Copy link
Contributor

@arighi arighi commented Sep 4, 2024

Prevent triggering a critical error when a local context for a task can't be found. Instead, handle the error gracefully to enhance the robustness of the schedulers based on scx_rustland_core.

Copy link
Contributor

@htejun htejun left a comment

Choose a reason for hiding this comment

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

It might be useful to distinguish when lookup failures can happen and when not, as if they do when they aren't supposed to, they tend to indicate BPF or scheduler bug. Maybe doing that doesn't make sense in rustland_core tho.

@arighi
Copy link
Contributor Author

arighi commented Sep 4, 2024

Hm... probably the best is to print a message in debugfs when it happens, at least in this way scx_rustland_core-based schedulers have the option to enable debugging and check if/when it's happening.

Edit: or have a global flag like a "paranoid mode" to consider all warnings as critical failures.

Prevent triggering a critical error when a local context for a task
can't be found.

Instead, handle the error gracefully (reporting a warning in debugfs) to
enhance the robustness of the schedulers based on scx_rustland_core.

Signed-off-by: Andrea Righi <[email protected]>
@arighi arighi force-pushed the rustland-core-handle-tctx-error branch from 4021ace to 5361704 Compare September 5, 2024 09:00
@arighi arighi merged commit 239b519 into main Sep 5, 2024
1 check failed
@arighi arighi deleted the rustland-core-handle-tctx-error branch September 5, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants