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

Invalid CPU count with offline CPUs #16

Open
GoogleCodeExporter opened this issue Mar 17, 2015 · 0 comments
Open

Invalid CPU count with offline CPUs #16

GoogleCodeExporter opened this issue Mar 17, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Put some "middle" CPUs offline (example: cpus 1 and 2 on a 4 cpus system). 
This can be done using "echo 0 > /sys/devices/system/cpu/cpuX/online".
2. Run test


What is the expected output? What do you see instead?

Unixbench should count 2 CPUs but counts 4, this is due to getCpuInfo routine 
which uses CPU ID as array index.


What version of the product are you using? On what operating system?

UnixBench 5.1.3, will behave like this on all systems


Please provide any additional information below.

The routine is also not written properly, the "processor : 0" line is not 
parsed because of the "next if (!$prop || !$val);" line. Thankfully the $cpu is 
initialized to 0 so there is no functionnal issue there.

I ran into this issue by trying to run the test with less cores than the system 
really has, due to hyperthreading I had to disable core 4-7 and 12-15 (as 
opposed to disabling core 8-15)

Original issue reported on code.google.com by [email protected] on 9 Feb 2015 at 1:27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant