-
Notifications
You must be signed in to change notification settings - Fork 91
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
rust: Add topology module to utils crate #143
Conversation
This could probably be a done a bit cleaner in terms of encapsulation, etc, but should hopefully be good enough for now. We can further clean up once we have more callers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, I'm definitely going to reuse it in scx_rustland!
BTW, I think it would be really helpful to add at the top a simple description of how to use this crate, maybe with a simple example, like how do I initialize a structure that allows me to determine the list of siblings of a specific CPU? Or how can I use the crate to print the CPU topology of my system?
Ack, I'll add that! |
Also, nice that you triggered a bug with rustland 😄
Good thing we have CI (looking at the bug). |
scx_rusty has logic in the scheduler to inspect the host to automatically build scheduling domains across every L3 cache. This would be generically useful for many different types of schedulers, so let's add it to the scx_utils crate so it can be used by others. Signed-off-by: David Vernet <[email protected]>
Signed-off-by: David Vernet <[email protected]>
53eafbf
to
ef8aa9e
Compare
@arighi I added quite a bit of documentation to the crate. I'm going to merge this for now, but please feel free to take a look and provide any additional suggestions, improvements, etc. A couple of things that I want to highlight:
With both of those said, the APIs here are subject to change, and likely will fairly soon. Of course, please feel free to use it for |
@Decave I think it looks good for now. I'll try to see if I can reuse something in rustland even if the API is not stable. That's totally fine, we can improve and change it later in the future. Thanks! |
scx_rusty has logic in the scheduler to inspect the host to automatically build scheduling domains across every L3 cache. This would be generically useful for many different types of schedulers, so let's add it to the scx_utils crate so it can be used by others.