mem-ruby: Writeback CHI UD_RU line at local evict
In Ruby CHI protocol UD_RU state means the line is in UD state in the local cache and the upstream may have it in UD or UC state. In the previous implementation UD_RU line was just dropped without WriteBack which can cause loss of dirty data when the upstream has it in UC state. This commit fixes it by performing WriteBack when evciting UD_RU line. Change-Id: I1db9b4f95cc576e71dcef38b01de24775df514ba
This commit is contained in:
@@ -892,10 +892,10 @@ void copyCacheAndDir(CacheEntry cache_entry, DirEntry dir_entry,
|
||||
if (is_valid(cache_entry) &&
|
||||
((initialState == State:UD) || (initialState == State:SD) ||
|
||||
(initialState == State:UC) || (initialState == State:SC) ||
|
||||
(initialState == State:UD_RSC) || (initialState == State:SD_RSC) ||
|
||||
(initialState == State:UC_RSC) || (initialState == State:SC_RSC) ||
|
||||
(initialState == State:UD_RSD) || (initialState == State:SD_RSD) ||
|
||||
(initialState == State:UD_T))) {
|
||||
(initialState == State:UD_RU) || (initialState == State:UD_RSC) ||
|
||||
(initialState == State:SD_RSC) || (initialState == State:UC_RSC) ||
|
||||
(initialState == State:SC_RSC) || (initialState == State:UD_RSD) ||
|
||||
(initialState == State:SD_RSD) || (initialState == State:UD_T))) {
|
||||
tbe.dataBlk := cache_entry.DataBlk;
|
||||
tbe.dataBlkValid.fillMask();
|
||||
tbe.dataValid := true;
|
||||
|
||||
@@ -710,10 +710,10 @@ transition({UD_RSC, UC_RSC, SC_RSC, SD_RSC, UD, RU, RSD, RUSD, RUSC, UD_RSD, SD_
|
||||
|
||||
// Cache Replacement
|
||||
|
||||
// When in UD_RU,UC_RU,UD_RSD,SD_RSD we also just drop the line since an upstream
|
||||
// When in UC_RU,UD_RSD,SD_RSD we also just drop the line since an upstream
|
||||
// cache has an up-to-data line that it will either WriteBack or WriteEvict
|
||||
transition({SC,UC,SC_RSC,UC_RSC,
|
||||
UD_RU,UC_RU,UD_RSD,SD_RSD}, LocalHN_Eviction, BUSY_BLKD) {ReplTBEAvailable} {
|
||||
UC_RU,UD_RSD,SD_RSD}, LocalHN_Eviction, BUSY_BLKD) {ReplTBEAvailable} {
|
||||
Initiate_Replacement;
|
||||
Initiate_Replacement_JustDrop;
|
||||
Profile_Eviction;
|
||||
@@ -722,7 +722,7 @@ transition({SC,UC,SC_RSC,UC_RSC,
|
||||
ProcessNextState;
|
||||
}
|
||||
|
||||
transition({UD,SD,UD_RSC,SD_RSC}, LocalHN_Eviction, BUSY_BLKD) {ReplTBEAvailable} {
|
||||
transition({UD,SD,UD_RU,UD_RSC,SD_RSC}, LocalHN_Eviction, BUSY_BLKD) {ReplTBEAvailable} {
|
||||
Initiate_Replacement;
|
||||
Initiate_Replacement_WB;
|
||||
Profile_Eviction;
|
||||
@@ -749,7 +749,7 @@ transition({UD,SD,UC}, Local_Eviction, BUSY_BLKD) {ReplTBEAvailable} {
|
||||
ProcessNextState;
|
||||
}
|
||||
|
||||
transition({UD_RU,UC_RU,UD_RSD,SD_RSD,SC_RSC,UC_RSC}, Local_Eviction, BUSY_BLKD) {ReplTBEAvailable} {
|
||||
transition({UC_RU,UD_RSD,SD_RSD,SC_RSC,UC_RSC}, Local_Eviction, BUSY_BLKD) {ReplTBEAvailable} {
|
||||
Initiate_Replacement;
|
||||
Initiate_Replacement_JustDrop;
|
||||
Profile_Eviction;
|
||||
@@ -758,7 +758,7 @@ transition({UD_RU,UC_RU,UD_RSD,SD_RSD,SC_RSC,UC_RSC}, Local_Eviction, BUSY_BLKD)
|
||||
ProcessNextState;
|
||||
}
|
||||
|
||||
transition({UD_RSC,SD_RSC}, Local_Eviction, BUSY_BLKD) {ReplTBEAvailable} {
|
||||
transition({UD_RU,UD_RSC,SD_RSC}, Local_Eviction, BUSY_BLKD) {ReplTBEAvailable} {
|
||||
Initiate_Replacement;
|
||||
Initiate_Replacement_WB;
|
||||
Profile_Eviction;
|
||||
|
||||
Reference in New Issue
Block a user