-
Notifications
You must be signed in to change notification settings - Fork 94
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_layered: Add Big/Little core growth algos #667
Conversation
Add extra ordering macros for Core/CPU structs for ease of use with Rust standard library features. This issue was hit when trying to sort cores based on the CoreType. See this similar issue for details: rust-lang/rust#113550 Signed-off-by: Daniel Hodges <[email protected]>
I will test this when I get back from LPC on some actual hardware to make sure the ordering is correct. |
2572d8f
to
a3d1344
Compare
Add core growth algos for Big/Little core support. The algos allow layers to grow layers by preferring either big or little cores first. Signed-off-by: Daniel Hodges <[email protected]>
@@ -99,13 +99,13 @@ lazy_static::lazy_static! { | |||
pub static ref NR_CPUS_POSSIBLE: usize = libbpf_rs::num_possible_cpus().unwrap(); | |||
} | |||
|
|||
#[derive(Debug, Clone, Eq, Hash, PartialEq)] | |||
#[derive(Debug, Clone, Eq, Hash, Ord, PartialEq, PartialOrd)] |
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.
added the extra sorting macros because I ran into this when trying to sort by CoreType
.
Sorting works properly:
The pcores on the tested machine (Intel i3-1220P) are ordered correctly:
|
Add layer growth algos for big/little core topologies that prefer one core type. Discussed this with @JakeHillion at LPC as another way to grow layers.