Huang Jiasen has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/53384 )
Change subject: mem: Fixed the bug of switching to ALLOCATE at once
......................................................................
mem: Fixed the bug of switching to ALLOCATE at once
Change-Id: Ia76b0a91910a5d769c6ed1856b98bc14ed465aa0
---
M src/mem/cache/base.cc
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index dc21151..350af6d 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -2643,11 +2643,20 @@
}
}
} else {
- // we did not see a write matching the previous one, start
- // over again
- byteCount = write_size;
- mode = WriteMode::ALLOCATE;
- resetDelay(blk_addr);
+ // continuous switch back to ALLOCATE
+ byteCount -= write_size;
+ if (mode == WriteMode::NO_ALLOCATE) {
+ if (byteCount < noAllocateLimit &&
+ byteCount >= coalesceLimit) {
+ mode = WriteMode::COALESCE;
+ }
+ }
+ else if (mode == WriteMode::COALESCE) {
+ if (byteCount < coalesceLimit) {
+ mode = WriteMode::ALLOCATE;
+ resetDelay(blk_addr);
+ }
+ }
}
nextAddr = write_addr + write_size;
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53384
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ia76b0a91910a5d769c6ed1856b98bc14ed465aa0
Gerrit-Change-Number: 53384
Gerrit-PatchSet: 1
Gerrit-Owner: Huang Jiasen <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s