Re: [Gems-users] SMT in GEMS2.1


Date: Tue, 25 Mar 2008 09:02:34 -0500 (CDT)
From: Luke Yen <lyen@xxxxxxxxxxx>
Subject: Re: [Gems-users] SMT in GEMS2.1
On Mon, 24 Mar 2008, Xuan Qi wrote:

Hi everyone,

I am trying to configure SMT in GEMS2.1. I checked mfacet.py and
GEMS/opal/system/system.C but the code for SMT looks kind of strange
to me. Please help to correct my understanding. Thanks a lot.

in system.C:
 "m_numSMTProcs = numProcs / CONFIG_LOGICAL_PER_PHY_PROC;"

 so the number of SMT processor is equal the number of processors
 initiated by simics over the number of config_logical on each SMT
 processor. And CONFIG_LOGICAL_PER_PHY_PROC should be at least 2 in
 order to make use of SMT (2 threads can issue
 instructions simutaneously), am I right?

    Yes, you are correct.

Next in system.C

 "ASSERT( (cpuNumber >= 0) && (cpuNumber < system_t::inst->m_numProcs) );

 int32 seq_index = cpuNumber;
 ASSERT(seq_index >= 0 && seq_index < system_t::inst->m_numSMTProcs);"

 As seq_index is equal to cpuNumber, if numProcs = 4, then seq_index can
 be 0, 1, 2, 3. But if i set CONFIG_LOGICAL_PER_PHY_PROC = 2, the
 seq_index can only be 0, 1 to satisfy the second assert. It is kind of
 conflict, isn't it?


These asserts are confusing but not incorrect. Ruby only knows about SMT processor numbers, so the cpuNumber passed in should be less than numProcs. In your example cpuNumber and seq_index should only be 0,1 if the SMT system is set up properly.

   Luke
[← Prev in Thread] Current Thread [Next in Thread→]