Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint -...

29
Runahead Runahead Processor Processor Finale Finale Doshi Doshi Ravi Palakodety Ravi Palakodety

Transcript of Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint -...

Page 1: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

RunaheadRunaheadProcessorProcessorFinale Finale DoshiDoshiRavi PalakodetyRavi Palakodety

Page 2: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

OutlineOutline

MotivationMotivationHigh Level DescriptionHigh Level DescriptionMicroarchitectureMicroarchitectureResultsResultsConclusionsConclusions

Page 3: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Where We Left Off…Where We Left Off…

Lab 3 Lab 3 –– Building a 4Building a 4--stage pipelined stage pipelined SMIPS processorSMIPS processorCritical Path Critical Path –– LoadLoad--αα

Fetch Fetch Decode Decode Execute Execute ReadDataCacheReadDataCache WritebackWriteback

Data Cache Miss?Data Cache Miss?Stall until data returns from Main MemoryStall until data returns from Main Memory

Page 4: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

A A BaaadBaaad ExampleExample

LdLd--αα, , LdLd--ββ, Ld, Ld--γγ, , ……If latency = 100 cycles from main If latency = 100 cycles from main memory to cache, then:memory to cache, then:

Initiate Initiate LdLd--αα requestrequestStall for 100 cyclesStall for 100 cyclesInitiate Initiate LdLd--ββ requestrequestStall for 100 cyclesStall for 100 cyclesAnd so onAnd so on……

Page 5: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Key InsightKey Insight

““RunaheadRunahead” to see whether there are ” to see whether there are memory accesses in the near futurememory accesses in the near futureWith an instruction sequence With an instruction sequence LdLd--αα, , LdLd--ββ

Initiate memory request for Initiate memory request for LdLd--ααContinue executionContinue executionInitiate memory request for Initiate memory request for LdLd--ββ

Page 6: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

OutlineOutline

MotivationMotivationHigh Level DescriptionHigh Level DescriptionMicroarchitectureMicroarchitectureResultsResultsConclusionsConclusions

Page 7: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

DataCacheDataCache Miss Occurs…Miss Occurs…

Backup the register fileBackup the register fileKeep running instructionsKeep running instructionsUse Use INVINV as the result of any ops that:as the result of any ops that:

Are Are DataCacheDataCache missesmissesDepend on calculations involving Depend on calculations involving DataCacheDataCachemissesmisses

Page 8: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Data Returns..Data Returns..

Cache is updated from Cache is updated from MainMemMainMem::Restore the register fileRestore the register fileRerun the original “offending” instructionRerun the original “offending” instruction

Page 9: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Follow the RulesFollow the Rules

Do NOTDo NOTUpdate the Update the DataCacheDataCache while in while in RunaheadRunaheadmodemodeInitiate Memory Requests that depend on Initiate Memory Requests that depend on INVINV addressesaddressesBranch when predicate depends on Branch when predicate depends on INVINVdatadataInitiate Memory Requests that cause Initiate Memory Requests that cause collisions in collisions in DataCacheDataCache

Page 10: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

OutlineOutline

MotivationMotivationHigh Level DescriptionHigh Level DescriptionMicroarchitectureMicroarchitectureResultsResultsConclusionsConclusions

Page 11: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Processor SideProcessor Side

Page 12: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Cache SideCache Side

Page 13: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Execution Execution -- Enter Enter RunaheadRunahead

Page 14: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Execution Execution -- In In RunaheadRunahead

Page 15: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Execution Execution -- Exit Exit RunaheadRunahead

Page 16: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Design ExplorationsDesign Explorations

Store Cache OptimizationStore Cache OptimizationDecisions when to exit Decisions when to exit runaheadrunahead

Page 17: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Store CacheStore Cache

LdLd--αα, St, St--ββ, Ld, Ld--ββRather than return Rather than return LdLd--ββ as as INVINV, return , return the value that was just stored.the value that was just stored.Use 4Use 4--entry table, as in Branch Predictorentry table, as in Branch Predictor

Page 18: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

When to Exit When to Exit RunaheadRunahead??

When the “offending” miss returns? ORWhen the “offending” miss returns? ORWhen all memory requests that are When all memory requests that are currently incurrently in--flight are processed?flight are processed?

Page 19: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

OutlineOutline

MotivationMotivationHigh Level DescriptionHigh Level DescriptionMicroarchitectureMicroarchitectureResultsResultsConclusionsConclusions

Page 20: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Key ParametersKey Parameters

Vary Latency of Main MemoryVary Latency of Main MemoryAs the latency increases, the impact of As the latency increases, the impact of runaheadrunahead becomes more significantbecomes more significantAt small latencies, the penalty for At small latencies, the penalty for entering/exiting entering/exiting runaheadrunahead can reduce can reduce performanceperformance

Page 21: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Key ParametersKey Parameters

Vary Size of Vary Size of FIFOsFIFOsAs the As the FIFOsFIFOs get larger, the processor is get larger, the processor is able to run further ahead and generate more able to run further ahead and generate more parallel memory requests.parallel memory requests.As the As the FIFOsFIFOs get larger, the penalty for get larger, the penalty for exiting exiting runaheadrunahead becomes more severe.becomes more severe.

Page 22: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

Testing StrategyTesting Strategy

Latencies of 1, 20, and 100 cyclesLatencies of 1, 20, and 100 cyclesFifosFifos of length 2, 5, 8, 15of length 2, 5, 8, 15Standard benchmarks; focus on Standard benchmarks; focus on vvaddvvadd

We’ll focus on length 15 We’ll focus on length 15 fifosfifos here since here since they allowed for the most extensive they allowed for the most extensive runaheadrunahead..

Page 23: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

ResultsResults

Page 24: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

ResultsResults

Page 25: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

ResultsResults

Page 26: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

OutlineOutline

MotivationMotivationHigh Level DescriptionHigh Level DescriptionMicroarchitectureMicroarchitectureResultsResultsConclusionsConclusions

Page 27: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

ConclusionsConclusions

RunaheadRunahead is good.is good.

Page 28: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

ConclusionsConclusions

RunaheadRunahead is a cheap and simple way to is a cheap and simple way to improve IPS.improve IPS.The enter/exit The enter/exit runaheadrunahead penalty is small penalty is small enough that the IPS is always enough that the IPS is always comparable to the Lab 3 processor.comparable to the Lab 3 processor.The control structure is (fairly) The control structure is (fairly) straightforward, with most improvements straightforward, with most improvements done on the cache side.done on the cache side.

Page 29: Runahead Processorcsg.csail.mit.edu/.../projects/group1-presentation.pdf · Microsoft PowerPoint - group1-presentation.ppt Author: Christopher Created Date: 10/26/2006 4:50:45 AM

ExtensionsExtensions

Aggressive Branch PredictionAggressive Branch PredictionDon’t stall when branch predicate is Don’t stall when branch predicate is INVINV

Save valid Save valid runaheadrunahead computationscomputationsAggressive Aggressive PrefetchingPrefetching

Predict addresses for Ld, St, when the given Predict addresses for Ld, St, when the given address is address is INVINV..