[Bug 7766] GetSystemInfo returns incorrect processor mask for MP systems

Wine Bugs wine-bugs at winehq.org
Fri Mar 16 16:53:01 CDT 2007


http://bugs.winehq.org/show_bug.cgi?id=7766





------- Additional Comments From focht at gmx.net  2007-16-03 16:53 -------
Hello,

by looking at wine GetSystemInfo() implementation (dlls\kernel32\cpu.c) it seems 
the "dwActiveProcessorMask" isnt retrieved on "linux" platform at all.
The "apple" platform code used following code:

--- snip ---
if (sysctlbyname ("hw.activecpu", &value, &valSize, NULL, 0) == 0)
	    cachedsi.dwActiveProcessorMask = value;
--- snip ---

Maybe there is no easy linux way to do this?
Instead the default "dwActiveProcessorMask = 1" is returned.

Windows has KeActiveProcessors field (kernel) which is bit set for each usable
processor on the system
The list of *active* processor entries/nodes is walked and each processor id bit
get or'ed into bit field, basically: loop with KeActiveProcessors |= 1 << Id;
Thats how "dwActiveProcessorMask" is basically determined there.

Looking at my linux box (intel core duo2) it seems there is processor topology
information in "/proc/cpuinfo". 

"processor"
"vendor id"
"physical id"
"siblings"
"core id"
"cpu cores"
... and the like

Its seems possible to determine all active physical and logical processors/cores
using this info and building processors mask (bit field).
But it seems this stuff is pretty new and older linux does not have all of these
fields (in /proc/cpuinfo).

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list