>> +static SYSTEM_LOGICAL_PROCESSOR_INFORMATION cached_lpi[1024]; >You think there are systems with that many CPUs running Wine? I honestly don't know the array is currently large enough to support 146 CPU's with 4 unique Caches (L1i,L1d,L2,L3), each in it's own processorpackage and numa node. This might be a bit of an overkill, any suggestions how many cpu's are used with wine in the worst case? > > + if ((processormask = sysfs_numanode_cpumap(nodecount)) > 0) > > + { > > + /* Numa Nodes are already unique. just add them */ > > + do > > + { > > + } > > + while ((processormask = > > sysfs_numanode_cpumap(nodecount)) > 0); + } > > + else > > + { > > + } > > People already asked you not to do this. From looking at the code it > appears that there is always one node. So get rid of everything except > do{} while() block. It will do exactly what you want with extra if()s.
This assumption is definitely wrong, on non-numa systems there is no node definition in SysFS. Windows on the same system shows one node and MSDN also hints that there should be a dummy node with number 0 and a processormask containing all known processors on the system in that case. I'll see that i can fix the rest of the things you mentioned and update the patch as soon as i can. Thanks for the quick review and sorry for the trouble.