Add support for Performance / Efficency cores.#2039
Conversation
|
It seems like this repo is using a fairly old version of Rust( Is there a reason this can't be raised(eg. MSRV)? If so, I can adapt this patch to use older Rust. |
I like that Rust is bringing an "always up-to-date" philosophy, so that a year old version is considered to be "fairly old" 😆 I don't think that it's needed to stay on 1.75, feel free to update to a newer version, I'd say 1.82 the newest. |
I think it works for me(I can see the profiling results), but I also don't know enough about |
|
Could you send some icount results for a few benchmarks? Just so that we can compare. And also the number of (P) cores that you have. |
|
Could you also rustfmt your code please, as well as fixing the unused warnings? (there seem to be a few typos in there as well). Thanks. |
|
It looks like some of the CI failures are caused by code I did not touch. I don' think fixing them in this PR would be right - I can fix them in another PR if needed. I think I caught all the typos in comments. As for the icounts, I only have the ones for an experimental patch to For summary-check they are(taken from the graph): 10.81 G incr-full I have 8 P cores(12 if you count the ones from hyper-threading) . |
|
The CI failures appeared because you bumped the toolchain, so clippy now has new issues with the code :) I'll update it to 1.81 in a separate PR. |
|
It would be better to rebase on top of master and then force-push, than to create the merge commit. You can check https://rustc-dev-guide.rust-lang.org/git.html#rebasing for some hints. |
3972c8f to
075b2a9
Compare
|
I fixed the suggestions made here:
|
Kobzol
left a comment
There was a problem hiding this comment.
Thanks! I appreciate that you took the time to fix this issue.
Since rustfmt choked on your code, I becometh rustfmt in the latest commit.

(Hopefully) fixes: #2008 on Linux.
Uses directories
/sys/devices/to detect if the system has a "Performace-Hybrid" architecture(has P and E cores). If P cores are detected, forces the benchmark to only run on Performance cores usingtaskset.Changes the P-core specific perf events
cpu_core/instructions:u/to "normal" eventsinstructions:u. I am a bit unsure if my implementation of that is correct, tough.