(Moving back to the gem5-dev list as this could be of broader interest.)

Hi Andreas,

That's a blast from the past... it looks like there are two semi-separate
uses of that flag, although the flag it self has the same semantics
(indicating that the supplier has/had an exclusive copy, i.e., E/M state
vs. O state):

1. The original application (http://repo.gem5.org/gem5/rev/000ab733f1eb)
was to avoid unnecessary snoops in multilevel cache hierarchies.  Say you
have multiple L2s where each L2 has multiple L1s.  If you request an
exclusive block, and get supplied a block by a peer L1 attached to the same
L2, then without the "supply exclusive" bit, you don't know whether or not
you need to send out a "downward" invalidate to make sure the other L2s and
their associated L1s get invalidated.  The bit tells you that the supplying
cache had the block in E or M state, so there's no need to broadcast an
invalidation more widely.  Obviously you can't rely on !sharedAsserted at
this point since you haven't even snooped those other caches yet (and the
whole point is to avoid doing so).

2. A few years later (http://repo.gem5.org/gem5/rev/d1ba390671ec) I reused
this bit for writebacks to indicate that the original block was in M state
and not O state.  The commit message sums it up pretty well:

If we write back an exclusive copy, we now mark it
as such, so the cache receiving the writeback can
mark its copy as exclusive. This avoids some
unnecessary upgrade requests when a cache later
tries to re-acquire exclusive access to the block.


Hope that helps...

Steve

On Mon, Mar 9, 2015 at 7:33 AM, Andreas Hansson <andreas.hans...@arm.com>
wrote:

>  Question for you concerning a change you made quite some years back: the
> setSupplyExclusive/isSupplyExclusive, why were those added? For the most
> part the cache seems to use “!sharedAsserted” to conclude that something is
> exclusive, but for write backs you added the exclusive flags above in
> addition to the shared flag. Do you remember what the logic was?
>
>  Thanks,
>
>  Andreas
>
>
>
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to