diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-09-09 14:40:18 -0400 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-09-09 14:40:18 -0400 |
commit | 71aca6d29e686ecdec2828c8be1989f74d9b28d3 (patch) | |
tree | 1ff5b36c08f5e1c3853208674608d141e2924c57 /src/mem/cache/mshr.hh | |
parent | 7c4dc4491a6367888154129d2799b5f564ecb0d9 (diff) | |
download | gem5-71aca6d29e686ecdec2828c8be1989f74d9b28d3.tar.xz |
cache: coherence protocol enhancements & bug fixes
Allow lower-level caches (e.g., L2 or L3) to pass exclusive
copies to higher levels (e.g., L1). This eliminates a lot
of unnecessary upgrade transactions on read-write sequences
to non-shared data.
Also some cleanup of MSHR coherence handling and multiple
bug fixes.
Diffstat (limited to 'src/mem/cache/mshr.hh')
-rw-r--r-- | src/mem/cache/mshr.hh | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/mem/cache/mshr.hh b/src/mem/cache/mshr.hh index 26eef2cac..9b55e70ef 100644 --- a/src/mem/cache/mshr.hh +++ b/src/mem/cache/mshr.hh @@ -134,8 +134,28 @@ class MSHR : public Packet::SenderState, public Printable bool downstreamPending; - bool pendingInvalidate; - bool pendingShared; + /** The pending* and post* flags are only valid if inService is + * true. Using the accessor functions lets us detect if these + * flags are accessed improperly. + */ + + /** Will we have a dirty copy after this request? */ + bool pendingDirty; + bool isPendingDirty() const { + assert(inService); return pendingDirty; + } + + /** Did we snoop an invalidate while waiting for data? */ + bool postInvalidate; + bool hasPostInvalidate() const { + assert(inService); return postInvalidate; + } + + /** Did we snoop a read while waiting for data? */ + bool postDowngrade; + bool hasPostDowngrade() const { + assert(inService); return postDowngrade; + } /** Thread number of the miss. */ ThreadID threadNum; @@ -180,7 +200,7 @@ public: void allocate(Addr addr, int size, PacketPtr pkt, Tick when, Counter _order); - bool markInService(); + bool markInService(PacketPtr pkt); void clearDownstreamPending(); |