- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That will give me HTT available.
The bios supplies the setting of HTT.
Is there a way of checking that setting usinga Windows API?
I am perfectly willing to accept registry queries.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Windows XP SP3 and following versions support GetLogicalProcessorInformation API call. The example in http://msdn.microsoft.com/en-us/library/ms683194(VS.85).aspxcomputes logical and physical core counts using the GetLogicalProcessorInformation function. One way of determining if HT is onon current Intel CPUs is to comparethese two numbers(i.e.if "processorCoreCount
Best regards,
Roman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply. I have been working pretty hard at this and have discovered the answer, after a lot of digging. You are correct in your statements, but you have to take it one step further.
int chips = 0;
int cores = 0;
int buses = 0;
int threads = 0;
int total = 0;
int cache[4] = { 0 };
bool threading = false;
/* requires WinXp SP3 or Win2003 SP1 */
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION pInfo = NULL;
int size = 0;
GetLogicalProcessorInformation( pInfo, &size );
pInfo = alloca( size ); /* on the stack */
if ( ! pInfo ) exit( 3 );
memset( pInfo, 0, size );
if ( ! GetLogicalProcessorInformation( pInfo, &size ) ) exit( 4 );
while ( size )
{
switch ( pInfo->Relationship )
{
case RelationNumaNode:
buses++;
break;
case RelationProcessorCore:
cores++;
threads = CountBits( (unsigned int)pInfo->ProcessorMask );
total += threads;
if ( pInfo->ProcessorCore.Flags == 1 )
threading = true;
break;
case RelationProcessorPackage:
chips++;
break;
case RelationCache:
cache[ pInfo->Cache.Level ] = pInfo->Cache.Size;
break;
default:
exit( 5 );
}
size -= sizeof *pInfo;
pInfo++;
}
It has to do with the ProcessorCore.Flags being set to one.
Unfortunately this is also true in the case of a VMware Guest which leads to a whole set of additional issues.
I have also indirectly seen this from a customer using this approach,
total = 2 chips = 1 cores = 1 threads = 2 threading = true
The chip was a "Intel Core2 CPU 6400 @ 2.13GHz".
I am at a complete loss at explaining this.This is the only instance that I have seen or heard of. I have asked the customer to check for a BIOS upgrade. The only other explanation I have, would be some sort of virtualization being present. I am 98% sure it's not VMware.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Windows Server 2003 and Windows XP Professional x64 Edition: [...] Therefore, to determine whether the processor supports multiple cores or hyperthreading on systems prior to Windows Vista, use the CPUID instruction.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page