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

CPU p-core detection should use capacity, not freq #43

Open
asahilina opened this issue Jul 6, 2024 · 2 comments
Open

CPU p-core detection should use capacity, not freq #43

asahilina opened this issue Jul 6, 2024 · 2 comments

Comments

@asahilina
Copy link
Contributor

Right now the code uses cpufreq/cpuinfo_max_freq. The correct way to identify different core types is the cpu_capacity file (/sys/devices/system/cpu/cpu3/cpu_capacity). This should be 1024 for p-cores, though it's probably safer to keep the current logic of taking the max number as the p-cores.

@teohhanhui
Copy link
Collaborator

Oops. Didn't know about that. Thanks!

It doesn't seem like cpu_capacity is always defined, so I think we still need a fallback to cpuinfo_max_freq?

@asahilina
Copy link
Contributor Author

I think cpu_capacity should always be defined for a system with properly configured big.LITTLE, but I guess maybe some platforms aren't always doing that? It might make sense to keep the cpuinfo_max_freq fallback then, yeah ^^

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

No branches or pull requests

2 participants