-
-
Notifications
You must be signed in to change notification settings - Fork 426
fix Issue 19861 - core.cpuid reports the wrong number of threads #2620
Conversation
Thanks for your pull request, @rainers! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "stable + druntime#2620" |
@FraMecca This worked for an AMD Ryzen, could you check it on your system, too? |
|
Anyone else with an AMD processor who can try this? Running and verifying this should be enough:
Do we know whether there is an AMD used by any CI? Parallel marking relies on this information, so would be good to have this in before the next release. |
cc @baziotis |
I have an AMD Ryzen 7 1700. It is 8-core processor, with 2 threads per core.
|
Thanks for testing. I guess this is without this patch? With the patch it should be correct (8/16), but unfortunately your CPU is exactly the same I've been trying it on. |
What are the odds..
Yes and yes. |
do not use i7 detection on AMD processors use cpuid 0x8000_001E to detect the number of threads per core
Rebased on stable as this is important for parallel marking to work on AMD systems. |
71c0eb5
to
3a5db12
Compare
auto tester redmond reports dubious values for Intel Core2, too:
|
Sorry for the delay. It works on my machines. |
Thanks for testing. I'll remove the verbose output of all the flags from the test. |
this good to go? |
I think so. The bad result for Intel Core2 is another issue, but it is a pretty old CPU (released 2008). |
fix Issue 19861 - core.cpuid reports the wrong number of threads merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com> Conflicts: win32.mak win64.mak
do not use i7 detection on AMD processors
use cpuid 0x8000_001E to detect the number of threads per core
It seems AMD uses the term "core" for "logical cores" or threads, too.