-
Notifications
You must be signed in to change notification settings - Fork 25
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
sysfs,cpuallocator: add support for hybrid core discovery, preferred allocation. #295
Conversation
b541412
to
f2065e1
Compare
f2065e1
to
8edb83b
Compare
@klihub can you please rebase this one ? |
Add support for hybrid core architectures by introducing core types. Add an interface for querying the available core types. Define core types for P- and E-cores and implement detection for those types. Signed-off-by: Krisztian Litkey <[email protected]>
8edb83b
to
3766e65
Compare
@fmuyassarov Rebased on latest main. |
2f0800b
to
45cfa38
Compare
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 @klihub. Looks pretty good
One nit about one of the commit messages: s/sorring/sorting/
45cfa38
to
d62c217
Compare
Thanks for spotting it. Fixed. |
d62c217
to
724d7d5
Compare
Allow overriding automatic core type detection using environment variables. Among other things, this can be used for e2e tests to emulate a hybrid architecture on non-hybrid hosts. Signed-off-by: Krisztian Litkey <[email protected]>
Update sample/test sysfs data to report multiple/hybrid core types. Signed-off-by: Krisztian Litkey <[email protected]>
724d7d5
to
f7c01cc
Compare
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.
Need to double-check CPU set comparison
f7c01cc
to
217eef9
Compare
217eef9
to
967146e
Compare
Classify all cores reported as E-cores by sysfs as low priority cores without looking at their cpufreq range. When sorting CPU sets for low-prio allocations, prefer the tightest fitting set which can satisfy the request with low-prio CPUs. Signed-off-by: Krisztian Litkey <[email protected]>
When sorting CPU sets for high-prio allocations, prefer the tightest fitting set which can satisfy the request with high-prio or normal-prio CPUs. Signed-off-by: Krisztian Litkey <[email protected]>
When allocating idle packages, consider a package idle if all online cores *with preferred priorities* for that allocation are idle. Also, from the picked packages take cores with this same restriction. In particular, on hybrid architectures with multiple core types, this will exclude - E-cores from allocations with Priority{Normal,High} preference - P-cores from allocations with PriorityLow preference Signed-off-by: Krisztian Litkey <[email protected]>
967146e
to
fef72fc
Compare
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 @klihub for the tireless work on this one. Now even I can understand how it works 😸 At the same time wondering when we reach the point that nobody understands how the cpuallocator actually works...
LGTM
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.
LGTM
Notes: This PR is stacked on top of #294 and #206.
This patch series adds support for discovering CPU cores of various kinds on hybrid core architecture systems. It also updates the CPU allocator to make better allocation choices on such systems, both with and without explicitly provided allocation preferences.