summaryrefslogtreecommitdiff
path: root/src/cpu/o3/fetch.hh
diff options
context:
space:
mode:
authorMitch Hayenga <mitch.hayenga@arm.com>2014-09-03 07:42:37 -0400
committerMitch Hayenga <mitch.hayenga@arm.com>2014-09-03 07:42:37 -0400
commit4f26bedc1883da58d1dceba2bbc555417b7a0cca (patch)
tree1f283ab152999760dddc5ac02035c2e54a76dd21 /src/cpu/o3/fetch.hh
parentdaedc5a49127eb91036291af1619bbc98016aff0 (diff)
downloadgem5-4f26bedc1883da58d1dceba2bbc555417b7a0cca.tar.xz
cpu: Fix SMT scheduling issue with the O3 cpu
The o3 cpu could attempt to schedule inactive threads under round-robin SMT mode. This is because it maintained an independent priority list of threads from the active thread list. This priority list could be come stale once threads were inactive, leading to the cpu trying to fetch/commit from inactive threads. Additionally the fetch queue is now forcibly flushed of instrctuctions from the de-scheduled thread. Relevant output: 24557000: system.cpu: [tid:1]: Calling deactivate thread. 24557000: system.cpu: [tid:1]: Removing from active threads list 24557500: system.cpu: FullO3CPU: Ticking main, FullO3CPU. 24557500: system.cpu.fetch: Running stage. 24557500: system.cpu.fetch: Attempting to fetch from [tid:1]
Diffstat (limited to 'src/cpu/o3/fetch.hh')
-rw-r--r--src/cpu/o3/fetch.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cpu/o3/fetch.hh b/src/cpu/o3/fetch.hh
index 2e9428ef1..4d01610d9 100644
--- a/src/cpu/o3/fetch.hh
+++ b/src/cpu/o3/fetch.hh
@@ -255,6 +255,8 @@ class DefaultFetch
/** Tells fetch to wake up from a quiesce instruction. */
void wakeFromQuiesce();
+ /** For priority-based fetch policies, need to keep update priorityList */
+ void deactivateThread(ThreadID tid);
private:
/** Reset this pipeline stage */
void resetStage();
@@ -484,8 +486,8 @@ class DefaultFetch
/** The size of the fetch queue in micro-ops */
unsigned fetchQueueSize;
- /** Queue of fetched instructions */
- std::deque<DynInstPtr> fetchQueue;
+ /** Queue of fetched instructions. Per-thread to prevent HoL blocking. */
+ std::deque<DynInstPtr> fetchQueue[Impl::MaxThreads];
/** Whether or not the fetch buffer data is valid. */
bool fetchBufferValid[Impl::MaxThreads];