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
v2.0.1 output on raspberry pi 4 / ubuntu 20 arm64 #66
Comments
@gounselor Thanks! I assume there is nothing wrong with the listed features? |
@klauspost let me attach /proc/cpuinfo: processor : 0 processor : 1 processor : 2 processor : 3 Hardware : BCM2835 I'm happy to help, debug or try things out. |
Looks like it matches. So this is pretty much what I expect for now. Maybe I can mimmic how Go sets the number of processors for GOMAXPROCS. |
Ok, so this is actual expected? |
Yes, hence why the documentation says:
Referring to If you want to, this should add some values for core counts, though it relies on the OS to provide that sparse information: #67 |
Ok i understand. Just read about MIDR_EL1 here https://www.kernel.org/doc/html/latest/arm64/cpu-feature-registers.html. So there is no easy way to get the values (besides reading /sys/devices/system/cpu/cpu0/regs/identification/midr_el1 on linux) and the feature flags are what counts here. I guess this issue then might be closed. Thanks Klaus, (also for compress!) |
@gounselor I added some more info to #67 - though it is not super useful information and since I don't have any hardware to test it is rather cumbersome and travis takes hours to complete a single test. |
I tried to build with a cloned repo, branch origin/arm64-linux-detect-cores with go.mod replace and i get this: github.com/klauspost/cpuid/v2.getproccount: relocation target runtime·sched_getaffinity not defined Maybe i did something wrong using the clone repo, go.mod replace approach. |
Update: replaced runtime·sched_getaffinity with runtime.sched_getaffinity in the cloned repo, it compiles. Output: ms@pi64:~/Sync/cpuid$ ./cpuid Nice. |
Ah, I found it as well. Ah, it shouldn't return right after the |
Yes: Name: Family is now detected. |
Merged. CI shows:
|
Build the example program on:
lsb_release:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
uname -a:
Linux pi64 5.4.0-1023-raspi #26-Ubuntu SMP PREEMPT Thu Nov 12 14:58:33 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
From /proc/cpuinfo:
...
Hardware : BCM2835
Revision : c03111
Serial : 1000000033c9f617
Model : Raspberry Pi 4 Model B Rev 1.1
Output:
ms@pi64:~/Sync/cpuid$ ./cpuid
Name:
PhysicalCores: 0
ThreadsPerCore: 1
LogicalCores: 0
Family 0 Model: 0 Vendor ID: VendorUnknown
Features: ARMCPUID,ASIMD,CRC32,EVTSTRM,FP
Cacheline bytes: 64
L1 Data Cache: -1 bytes
L1 Instruction Cache: -1 bytes
L2 Cache: -1 bytes
L3 Cache: -1 bytes
Frequency 0 hz
The text was updated successfully, but these errors were encountered: