Re: [Gems-users] When to invalidate instruction (trace) cache?


Date: Sun, 9 Dec 2007 20:10:26 -0600
From: "Mike Marty" <mike.marty@xxxxxxxxx>
Subject: Re: [Gems-users] When to invalidate instruction (trace) cache?
I can't tell you when the correct time to flush the trace cache is.  That is a research area I'm not very familiar with.

I could be completely wrong, but it might make sense to completely implement a trace cache in Opal instead of Ruby. 

--Mike


On Dec 8, 2007 11:32 PM, Eirik Bakke <ebakke@xxxxxxxxxxxxx> wrote:
We are implementing/simulating a Trace Cache [1] in ruby. While an
instruction cache stores sequences of instructions in the order they are
stored in memory (static order), the Trace Cache stores sequences of
instructions in the order they are fetched and executed (dynamic order).
Most of our changes are limited to "opal/system/pseq.C".

Since the Trace Cache is indeed a cache that is supposed to reflect data in
memory (instructions), it must be flushed every now and then. In particular,
it must be flushed whenever instructions are loaded for the first time (into
a location which potentially could have contained other instructions
before). According to [2], SPARC requires that a FLUSH instruction is issued
before newly loaded instructions are executed, to flush the instruction
cache. If this is the case, we can simply flush entries in the Trace Cache
at the same time. However, [3] seems to indicate that there are several
other more obscure methods that software may use to achieve the same effect.

When is the correct time to flush instructions from an instruction or trace
cache? Where is the best spot to hook into this in opal?

Eirik & Evan

[1] www.tinker.ncsu.edu/ericro/publications/conference_MICRO-29_rbs.pdf
[2] http://bugs.opensolaris.org/view_bug.do?bug_id=1238184
[3] http://www.sparc.org/standards/sparc64.errata.txt

_______________________________________________
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.


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