Hi,
I recently asked some questions regarding consistency issues in GEMS
(see
https://lists.cs.wisc.edu/archive/gems-users/2006-October/msg00008.shtml)
and this is a similar issue.
As far as I understand from the code, if TSO==true (default: false)
then Ruby would actually simulate the data values in the StoreBuffer (search
TSO in $GEMS/ruby/system/Sequencer.C). Also, if DATA_BLOCK==true (default:
false), then the cache blocks in Ruby would actually hold the memory values:
$GEMS/ruby/system/DirectoryMemory.C loads the data from Simics as needed,
and $GEMS/ruby/common/DataBlock.C is initialized with a size defined by
g_DATA_BLOCK_BYTES, this is, some space is reserved for the data in the
caches. This is also used, for example, for the log buffer in LogTM
protocols (which holds the clean DataBlocks of a transition, and restores
the main memory from them if needed).
However, to make Ruby follow a TSO model, Simics is needed to read
the value held in Ruby, instead of the value from Simics global memory. If
only Simics processors are stalled/unstalled, then the values that Loads
receive are the values from Simics global memory image. Modifying the loaded
value can be implemented with a "snoop-memory" interface in Simics, which is
in fact registered in $GEMS/ruby/module/ruby.c. The callback function (the
function which Simics calls after the memory operation, that can modify the
value) is observeMemoryAccess, in $GEMS/ruby/simics/SimicsProcessor.[Ch].
However, this function has the operations that modify the value commented,
*returning always the global value from Simics' memory* (There is a "NOT
IMPLEMENTED" comment).
If the consistency model was TSO, then the actual values should be
modified in this function; however, as Mike pointed me previously, this
wouldn't be a Timing-first simulation any more: part of the "correctness" of
Simics is moved to GEMS. As far as I know, if this was correctly programmed
(which is not so trivial), Solaris might work perfectly, as it is designed
to work on TSO SPARC processors. However, in case of an error, GEMS would
not be able to rely on Simics to provide a correct execution (as GEMS has
modified the correct execution of Simics).
Considering this, with the current code the resulting consistency
model would always be SC. This seems to be a little "tricky", as it provides
the speed advantage of TSO (values can be received from the local
StoreBuffer before being globally visible, for example) without the
disadvantages (subtle memory arrangements which make SC code not working on
all cases, need for synchronization instructions). However, any valid SC
memory ordering is always a valid TSO ordering (but not the other sense).
As a final question, are there any plans to work further on this
memory consistency area? I hope that these comments are accurate and of any
help, correct me if I had any mistake.
Regards,
Enrique Vallejo
University of Cantabria, Spain
-----Mensaje original-----
De: gems-users-bounces@xxxxxxxxxxx [mailto:gems-users-bounces@xxxxxxxxxxx]
En nombre de Dan Gibson
Enviado el: lunes, 09 de octubre de 2006 21:15
Para: Gems Users
Asunto: Re: [Gems-users] what is TSO?
Ruby can simulate the timing of the TSO memory model for some protocol
options. It does NOT simulate the data values. You'd have to look at the
code to see which protocols this will work with the TSO flag.
Mike Marty wrote:
> Total Store Ordering memory consistency model
>
>
>
>> Hello,
>>
>> I have noticed some operations related with "TSO" in
>> Sequencer.C, could you please tell me what TSO is and
>> why it is used for?
>>
>> Thanks.
>>
>> DZ
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam? Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
>> _______________________________________________
>> Gems-users mailing list
>> Gems-users@xxxxxxxxxxx
>> https://lists.cs.wisc.edu/mailman/listinfo/gems-users
>> Use Google to search the GEMS Users mailing list by adding
"site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.
>>
>>
> _______________________________________________
> Gems-users mailing list
> Gems-users@xxxxxxxxxxx
> https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> Use Google to search the GEMS Users mailing list by adding
"site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.
>
>
--
http://www.cs.wisc.edu/~gibson [esc]:wq!
_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding
"site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.
|