[fpc-devel] Feature announcement: Extension of TThread's interface

patspiper patspiper at gmail.com
Fri Dec 28 11:01:54 CET 2012


On 27/12/12 22:38, Ewald wrote:
> Hmmm, that;s indeed quite some different output you've got there. Mine 
> looks like this:
>
>     processor       : 0
>     vendor_id       : GenuineIntel
>     cpu family      : 6
>     model           : 23
>     model name      : Intel(R) Core(TM)2 Duo CPU     E8600  @ 3.33GHz
>     stepping        : 10
>     microcode       : 0xa07
>     cpu MHz         : 2000.000
>     cache size      : 6144 KB
>     physical id     : 0
>     siblings        : 2
>     core id         : 0
>     cpu cores       : 2
>     apicid          : 0
>     initial apicid  : 0
>     fpu             : yes
>     fpu_exception   : yes
>     cpuid level     : 13
>     wp              : yes
>     flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
>     pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
>     pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl
>     aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16
>     xtpr pdcm sse4_1 xsave lahf_lm dtherm tpr_shadow vnmi flexpriority
>     bogomips        : 6668.63
>     clflush size    : 64
>     cache_alignment : 64
>     address sizes   : 36 bits physical, 48 bits virtual
>     power management:
>
>
> (this is repeated twice, with only `processor:0` changing to 
> `processor:1`)
>
>
> Since this is the same kind of output I got on several other linux 
> distributions/architectures(--> 32 bit versus 64 bit intel), I assumed 
> it was kinda `standard`. Then again assume = ...
>
> Well, anyway, it's a bit trickier than I thought at first in that case.

I guess one way of calculating the number of processors is to iterate 
through every 'processor' in the list and add 1 if 'siblings' = 'cpu 
cores' (no hyperthreading), and 0.5 if 'siblings' = 2 x 'cpu cores' 
(hyperthreading enabled).

Despite your listing of cpuinfo is partial, one can deduce that you 
don't have hyperthreading.

Stephano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20121228/035efe8d/attachment.html>


More information about the fpc-devel mailing list