Burak Öçalan has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/46759 )

Change subject: mem-cache: queued prefetcher bug fix
......................................................................

mem-cache: queued prefetcher bug fix

In queued prefetcher, addToQueue function doesn't behave
correctly where the element must be added to the end of queue.
I fixed this bug.

Change-Id: I1eec129f827b6465e7cef874c551d96acbf18d5b
Signed-off-by: Burak Öçalan <[email protected]>
Reported-by: Burak Öçalan <[email protected]>
Tested-by: Burak Öçalan <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46759
Reviewed-by: Daniel Carvalho <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/mem/cache/prefetch/queued.cc
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks good to me, approved
  Daniel Carvalho: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/mem/cache/prefetch/queued.cc b/src/mem/cache/prefetch/queued.cc
index 2a74a17..db3ba2f 100644
--- a/src/mem/cache/prefetch/queued.cc
+++ b/src/mem/cache/prefetch/queued.cc
@@ -472,7 +472,7 @@
         queue.erase(it);
     }

-    if (queue.size() == 0) {
+    if ((queue.size() == 0) || (dpp <= queue.back())) {
         queue.emplace_back(dpp);
     } else {
         iterator it = queue.end();

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/46759
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: I1eec129f827b6465e7cef874c551d96acbf18d5b
Gerrit-Change-Number: 46759
Gerrit-PatchSet: 6
Gerrit-Owner: Burak Öçalan <[email protected]>
Gerrit-Reviewer: Burak Öçalan <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to