Correct Alignment of a RAS after Call and Return Mispredictions - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Correct Alignment of a RAS after Call and Return Mispredictions

Description:

Workshop on Duplicating Deconstructing and Debunking (WDDD 2005) ... Call uncorruption optimization for free. How to fix correct alignment in SimpleScalar ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 24
Provided by: vdes8
Category:

less

Transcript and Presenter's Notes

Title: Correct Alignment of a RAS after Call and Return Mispredictions


1
Correct Alignment of a RAS after Call and Return
Mispredictions
Veerle Desmet Yiannakis Sazeides Constantinos
Kourouyiannis Koen De Bosschere
  • Ghent University

University of Cyprus
2
Motivation
  • Return-Address-Stack (RAS)
  • Correct alignment
  • Effect deeper pipelines

by Veerle Desmet Ghent University
3
Return-Address-Stack (RAS)
main() my_printf() my_function()
my_printf() return
main my_printf() my_function()
my_printf() return
my_printf()
my_function()
my_printf for(condition) printf() return
my_function / fun / return
printf()
RAS
printf / print / return
return from printf
return from printf
function calls push return address on RAS
1
return from my_printf
return from my_printf
return from my_function
returns predicted by popping from RAS
2
return from main
4
Mispredictions
recovery
?
checkpoint
fetch
wrong path
Speculative RAS updates due to wrong path calls
5
Bottlenecks for RAS performance
Overflow call depth exceeds stack size
RAS
Corruption RAS content overwritten by wrong
path calls
De-alignment unbalanced of call/return
return from printf
return from my_printf
TOS
TOS
return from my_printf
return from main
6
Correct Alignment
Checkpoint TOS
1
Wrong path
3
RAS
e.g. 1 misspeculated call
?
return from printf
return from wrong path
return from wrong path
return from my_function
Recovery to checkpointed TOS
4
return from main
7
after Call Mispredictions
Checkpoint TOS
1
RAS
Wrong path
3
return from wrong path
return from wrong path
e.g. 1 misspeculated call
return from printf
return from mispr. call
?
return from my_function
Recovery to checkpointed TOS
4
return from main
8
after Return Mispredictions
Checkpoint TOS
1
RAS
Wrong path
3
e.g. no misspeculated calls or returns
return from printf
?
return from mispr return
return from mispr return
Recovery to checkpointed TOS
4
return from main
9
Correct Alignment
Incorrect Alignment
Correct Alignment
Conditional branch misprediction
Return misprediction
Call misprediction
RAS
RAS
RAS
return from printf
return from mispred call
mispred. return addr
10
Correct Alignment
Incorrect Alignment
Speedup can be affected by up to 10
Correct Alignment
11
A lot of published work
SimpleScalar
SimWattch
HydraScalar
Simca
INCORRECT LOWER PERFORMING
CORRECT
UNCLEAR
Jourdan
Eickemeyer, Hoyt, Hummel, McDonald, McMahan Steely
Yeh, Intel patent
12
Bottlenecks for RAS performance
Overflow call depth exceeds stack size
RAS
Corruption RAS content overwritten by wrong
path calls
De-alignment unbalanced of call/return
return from printf
return from my_printf
TOS
TOS
return from my_printf
return from main
13
RAS content recovery
Skadron et al. _at_ MICRO 1998
top of stack data
Also checkpoints/recovers top of stack data 2
speedup on average
Incorrect Alignment
Correct Alignment
14
Motivation
  • Return-Address-Stack (RAS)
  • Correct alignment
  • Effect deeper pipelines

by Veerle Desmet Ghent University
15
Deeper Pipelines
8-entry RAS
16-entry RAS
32-entry RAS
64-entry RAS
Independence on RAS size
On average, reasonable scaling
16
But... per benchmark
5 stages
10 stages
32-entry RAS
15 stages
-5
-7
20 stages
25 stages
30 stages
17
Corruptions per kilo instructions
32-entry RAS
Backward (tos,1,) more destructive than
forward corruption (31,30,)
RAS
3
4

30
31
tos
1
1
2
corruption distance
18
Individual benchmarks
20 stage pipeline
32-entry RAS
19
TOS behavior
20 stage pipeline
32-entry RAS
More backward corruption
Mainly forward corruption
time
time
li95
gcc95
20
Bottlenecks for RAS performance
Overflow call depth exceeds stack size
RAS
Corruption RAS content overwritten by wrong
path calls
De-alignment unbalanced of call/return
return from printf
return from my_printf
TOS
TOS
return from my_printf
return from main
21
TOS Behavior
20 stage pipeline
32-entry RAS
no overflow
overflow
time
time
li95
gcc95
22
Summary
  • Correct Aligned RAS
  • Return misprediction decrease with 40
  • Speedup of up to 10
  • Deeper Pipelines
  • One of the best performing RAS recovery
    techniques
  • Satisfactory on average
  • Performance decrease up to 7 for some programs
  • May need to checkpoint more content
  • Paper
  • Possible implementations
  • Call uncorruption optimization for free
  • How to fix correct alignment in SimpleScalar

23
Correct Alignment of a RAS after Call and Return
Mispredictions
Veerle Desmet Yiannakis Sazeides Constantinos
Kourouyiannis Koen De Bosschere
  • Ghent University

University of Cyprus
Write a Comment
User Comments (0)
About PowerShow.com