Giacomo Travaglini has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/46940 )
Change subject: cpu-o3: Fix "OldestReady" scheduling bug
......................................................................
cpu-o3: Fix "OldestReady" scheduling bug
Fixed a bug in the SMT scheduling function oldestReady(), where
the oldest sequence number and its thread id were mixed up.
Change-Id: I31df5eac73ecabbe04fb54624ee1b1867fa4d3c0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46940
Reviewed-by: Richard Cooper <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/cpu/o3/commit.cc
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Richard Cooper: Looks good to me, but someone else must approve
kokoro: Regressions pass
diff --git a/src/cpu/o3/commit.cc b/src/cpu/o3/commit.cc
index 2359c1a..23265d4 100644
--- a/src/cpu/o3/commit.cc
+++ b/src/cpu/o3/commit.cc
@@ -1498,6 +1498,7 @@
Commit::oldestReady()
{
unsigned oldest = 0;
+ unsigned oldest_seq_num = 0;
bool first = true;
std::list<ThreadID>::iterator threads = activeThreads->begin();
@@ -1517,9 +1518,11 @@
if (first) {
oldest = tid;
+ oldest_seq_num = head_inst->seqNum;
first = false;
- } else if (head_inst->seqNum < oldest) {
+ } else if (head_inst->seqNum < oldest_seq_num) {
oldest = tid;
+ oldest_seq_num = head_inst->seqNum;
}
}
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/46940
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: I31df5eac73ecabbe04fb54624ee1b1867fa4d3c0
Gerrit-Change-Number: 46940
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Richard Cooper <[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