sifadil / pcsx2-playground

Automatically exported from code.google.com/p/pcsx2-playground
2 stars 0 forks source link

Not Propertly detect cores on cpu. #96

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This log in console:

PCSX2 Playground (beta) - compiled on Dec 28 2008
Savestate version: 7a300010
EE pc offset: 0x2a8, IOP pc offset: 0x208
x86Init:
        CPU vender name =  AuthenticAMD
        FamilyID  =  1
        x86Family =  AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
        CPU speed =  2.661 Ghz
        Cores     =  1 physical [2 logical]
        x86PType  =  Standard OEM
        x86Flags  =  178bfbff 00000001
        x86EFlags =  e3d3fbff

But 'Cores     =  1 physical [2 logical]' mismath

Original issue reported on code.google.com by NIKE.SP...@gmail.com on 29 Dec 2008 at 9:14

GoogleCodeExporter commented 8 years ago
Researched your CPU, and it's more or less correct that it's a single core CPU 
that
has two logical cores:

"The Athlon 64 X2 is the first dual-core desktop CPU manufactured by AMD. It is
essentially a processor consisting of two Athlon 64 cores joined together on 
one die
with additional control logic. The cores share one dual-channel memory 
controller,
are based on the E-stepping model of Athlon 64 and, depending on the model, have
either 512 or 1024 KB of L2 Cache per core."

On the bright side each core has it's own L2 cache (although the L2 caches are 
half
the size of regular L2 caches so it's still more in common with logical cores 
than
physical ones there).  So yeah they are basically logical cores, not physical 
ones.

The term 'Logical' could be deceiving, but it *is* a single die cpu and it does 
share
the same memory controller.  So fundamentally speaking, it is really a single 
core
CPU that's capable of running two concurrent threads.  But "dual core" is a 
marketing
buzzword right now, so that's what they called it.

Original comment by Jake.Stine on 29 Dec 2008 at 4:12

GoogleCodeExporter commented 8 years ago
I think, in general, logical #cores is the same as physical #cores except for
SMT(hyperthreading)-capable CPU.
Like:
Pentium 4 (HT) : 1 physical, 2 logical
C2D,AthlonX2 : 2 physical, 2 logical
C2Q,PhenomX4 : 4 physical, 4 logical
Core i7 (HT) : 4 physical, 8 logical
Core i7 (HT disabled) : 4 physical, 4 logical

Original comment by tmkkmac on 30 Dec 2008 at 7:54

GoogleCodeExporter commented 8 years ago
Probably this is a better way to detect multicore cpu, using cpuid(0x00000004) 
for
intel and cpuid(0x80000008) for amd.

Original comment by tmkkmac on 30 Dec 2008 at 10:26

Attachments:

GoogleCodeExporter commented 8 years ago
Ok, it's worth a shot.  The current core counter is bogus as it turns out.  The
hyperthreading flags and LogicalCores values are all set to 2 for just about 
every
CPU on the market (online reference material for core counting is really 
inaccurate
still these days too -- even the Intel docs on CPUID aren't right half the 
time).

For example, though, Sun Microsystems has released several serveral CPUs over 
the
years that could run between 2 and 8 threads concurrently, and they were all
"technically" considered single-core processors.  But then again in the business
world the idea of having multiple cores wasn't really a selling point.  So yeah,
counting cores can get pretty subjective.  Few things are ever cut and dry. :/

Original comment by Jake.Stine on 31 Dec 2008 at 6:41

GoogleCodeExporter commented 8 years ago
Yes, I think it is confusing that every "true" multi-core processors have HT(it 
means
"pseudo" multi-core) flag. There is no way to differentiate true multi-core
processors and pseudo multi-core processors only with HT flag and LogicalCores 
value.

Sun's Niagara series has physically 8 cores, and it is able to run 32 (or 64) 
threads
simultaneously thanks to 4(8)-way SMT (FGMT, to be exact). So it should be 
treated as
a physically 8-core, logically 32(64)-core processor.

Original comment by tmkkmac on 31 Dec 2008 at 7:49

GoogleCodeExporter commented 8 years ago
PCSX2 Playground (beta) - compiled on Dec 31 2008
Savestate version: 7a300011
x86Init:
        CPU vender name =  AuthenticAMD
        FamilyID  =  1
        x86Family =  AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
        CPU speed =  2.661 Ghz
        Cores     =  2 physical [2 logical]
        x86PType  =  Standard OEM
        x86Flags  =  178bfbff 00000001
        x86EFlags =  e3d3fbff

On rev 520 work fine :) close issue

Original comment by NIKE.SP...@gmail.com on 31 Dec 2008 at 12:03

GoogleCodeExporter commented 8 years ago

Original comment by Jake.Stine on 31 Dec 2008 at 12:07