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

Add cpumask.rs crate #152

Merged
merged 2 commits into from
Feb 23, 2024
Merged

Add cpumask.rs crate #152

merged 2 commits into from
Feb 23, 2024

Conversation

Byte-Lab
Copy link
Contributor

Manipulating cpumasks is a very common occurrence in sched_ext schedulers. The Rust BitVec object is available, but it's pretty confusing to use, and we also have to deal with sched_ext-specific things like being able to represent the bitmask in a way that can be consumed by BPF programs, etc.

Let's pull that logic into a new cpumask.rs crate that wraps BitVec, and provides a number of quality-of-life improvements. Along the way, we pull some logic out of topology.rs and move it to cpumask.rs. In a future (soon) change, we'll further update topology.rs to be more generic.

Let's add a Cpumask trait that schedulers can use to avoid all having to
deal directly with BitVec and the like.

Signed-off-by: David Vernet <void@manifault.com>
Now that we have cpumask.rs, we can remove some logic from topology.rs
and have it create and use Cpumasks.

Signed-off-by: David Vernet <void@manifault.com>
@Byte-Lab Byte-Lab requested a review from htejun February 22, 2024 23:29
@Byte-Lab Byte-Lab merged commit 608df7f into main Feb 23, 2024
1 check passed
@Byte-Lab Byte-Lab deleted the topology_refactor branch February 23, 2024 00:07
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.

None yet

2 participants