[fpc-devel] AMD & Intel CPUCount

Ewald ewald at yellowcouch.org
Fri Dec 28 15:49:10 CET 2012

Once upon a time, on 12/28/2012 09:29 AM to be precise, Mark Morgan
Lloyd said:
> Ludo Brands wrote:
>> On 27/12/2012 23:06, Ewald wrote:
>>> Oh, and the important part: The function has been tested on a Core 2
>>> Duo
>>> and an Intel i7, and works correctly. If someone would be so kind to
>>> test it on some other CPU's that would be great! [I'm not 100% of the
>>> hexadecimal of `AuthenticAMD` you see]
>> Inconsistent results here with hyperthreading:
>> Xeon W3530 (4 cores hyperthreading) reports #CPU cores: 8.
>> /proc/cpuinfo lists 8 processors and 4 cpu cores
>> Intel Atom 230 (1 core hyperthreading) reports #CPU cores: 1 while
>> /proc/cpuinfo reports 2 processors and 1 cpu core.
>> AMD Athlon X2 5600+ reports #CPU cores: 2. /proc/cpuinfo reports 2
>> processors and 2 cores.
> Also be careful of the situation where an OS supports hot-pluggable
> CPU cards and has been told to shut one down for maintenance. Solaris
> definitely does this on SPARC, I don't know about its position on x86,
> and I don't know about Linux's general position.
Well, the code I posted here doesn't take this sort of hotplugging in
account, since it returns the # processor cores per physical cpu. Also
when software shuts down cpu cores these aren't reflected in the result
of the function. (says intel documentation)


More information about the fpc-devel mailing list