Pouya Fotouhi has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/16809
Change subject: mem-ruby: Use check_on_cache_probe to protect locked lines
from eviction
......................................................................
mem-ruby: Use check_on_cache_probe to protect locked lines from eviction
This change uses check_on_cache_probe statement to check if the cacheline
subject to eviction is locked in MESI Two Level. Other protocols should
be updated accordingly.
Signed-off-by: Pouya Fotouhi <[email protected]>
Change-Id: Idcdbc8ee528eb5e4e2f8d56a268a3a92eadd95b1
---
M src/mem/protocol/MESI_Two_Level-L1cache.sm
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/mem/protocol/MESI_Two_Level-L1cache.sm
b/src/mem/protocol/MESI_Two_Level-L1cache.sm
index 87684ce..155c2b1 100644
--- a/src/mem/protocol/MESI_Two_Level-L1cache.sm
+++ b/src/mem/protocol/MESI_Two_Level-L1cache.sm
@@ -472,6 +472,11 @@
L1Icache_entry, TBEs[in_msg.LineAddress]);
} else {
// No room in the L1, so we need to make room in the L1
+
+ // Check if the line we want to evict is not locked
+ Addr addr := L1Icache.cacheProbe(in_msg.LineAddress);
+ check_on_cache_probe(mandatoryQueue_in, addr);
+
trigger(Event:L1_Replacement,
L1Icache.cacheProbe(in_msg.LineAddress),
getL1ICacheEntry(L1Icache.cacheProbe(in_msg.LineAddress)),
TBEs[L1Icache.cacheProbe(in_msg.LineAddress)]);
@@ -502,6 +507,11 @@
L1Dcache_entry, TBEs[in_msg.LineAddress]);
} else {
// No room in the L1, so we need to make room in the L1
+
+ // Check if the line we want to evict is not locked
+ Addr addr := L1Icache.cacheProbe(in_msg.LineAddress);
+ check_on_cache_probe(mandatoryQueue_in, addr);
+
trigger(Event:L1_Replacement,
L1Dcache.cacheProbe(in_msg.LineAddress),
getL1DCacheEntry(L1Dcache.cacheProbe(in_msg.LineAddress)),
TBEs[L1Dcache.cacheProbe(in_msg.LineAddress)]);
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/16809
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Idcdbc8ee528eb5e4e2f8d56a268a3a92eadd95b1
Gerrit-Change-Number: 16809
Gerrit-PatchSet: 1
Gerrit-Owner: Pouya Fotouhi <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev