Skip to content

scx_layered: associate each layer with a cpumask #1972

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

etsal
Copy link
Contributor

@etsal etsal commented May 23, 2025

Associate each layer in the scheduler with the cpuset of the tasks running in the layer. This will be used in the future to improve support for containers that have associated cpusets.

@etsal etsal requested a review from likewhatevs May 23, 2025 22:41
Copy link
Contributor

@likewhatevs likewhatevs left a comment

Choose a reason for hiding this comment

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

lets do it

@@ -351,6 +351,7 @@ struct layer {
char name[MAX_LAYER_NAME];
bool is_protected;
bool periodically_refresh;
u8 cpuset[MAX_CPUS_U8];
Copy link
Contributor

Choose a reason for hiding this comment

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

While it's following the existing usage, it'd probably be better to switch to u64 for bpf masks. All registers are 64bits anyway, so using u8 would just add unnecessasry masking operations.

@likewhatevs
Copy link
Contributor

Misc thing for later, this should probably error if the last layer has a cpuset on it.

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.

3 participants