LASER: Light, Accurate Sharing dEtection and Repair
Liang ¡Luo, ¡Akshitha ¡Sriraman, ¡Brooke ¡Fugate, ¡Shiliang ¡Hu, ¡Chris ¡J ¡Newburn, ¡ Gilles ¡Pokam, ¡Joseph ¡DevieA ¡
LASER: Light, Accurate Sharing dEtection and Repair Liang Luo, - - PowerPoint PPT Presentation
LASER: Light, Accurate Sharing dEtection and Repair Liang Luo, Akshitha Sriraman, Brooke Fugate, Shiliang Hu, Chris J Newburn, Gilles Pokam, Joseph DevieA Multicore is Eating the World
Liang ¡Luo, ¡Akshitha ¡Sriraman, ¡Brooke ¡Fugate, ¡Shiliang ¡Hu, ¡Chris ¡J ¡Newburn, ¡ Gilles ¡Pokam, ¡Joseph ¡DevieA ¡
¡
2 ¡
3 ¡
Core Core 1 Write X Read X
4 ¡
Core Core 1 Write X Read X X
5 ¡
Cache Line
Cache Line
Core Core 1 Write X Read Y X Y
6 ¡
¡ ¡ ¡ ¡ ¡ ¡ ¡[Liu ¡and ¡Berger, ¡OOPSLA ¡2011] ¡
¡ ¡ ¡ ¡ ¡ ¡ ¡[NanavaM ¡et ¡al., ¡EuroSys ¡2013] ¡ ¡
¡ ¡ ¡ ¡ ¡ ¡ ¡[Liu ¡and ¡Liu, ¡CGO ¡2016] ¡
¡ ¡ ¡ ¡ ¡ ¡ ¡[Intel]
7 ¡
MEM_LOAD_UOPS_LLC_XNSP_HIT M PEBS Record struct ¡ { ¡ ¡ ¡ ¡ ¡ ¡ ¡uint64_t ¡ip; ¡ ¡ ¡ ¡ ¡ ¡ ¡uint64_t ¡addr; ¡ ¡ ¡ ¡ ¡ ¡ ¡… ¡ ¡ ¡ ¡ ¡ ¡char ¡csrc; ¡ ¡ ¡ ¡ ¡ ¡ ¡char ¡cdst; ¡ ¡ } ¡ ¡
8 ¡
Core Core 1 Write X Read X
9 ¡
% correct data addresses
10 ¡
160 simple benchmarks
Counting only exact addresses as being correct
160 simple benchmarks
11 ¡
% correct PC addresses
Counting only exact PC as being correct Counting adjacent PCs as being correct
12 ¡
¡
13 ¡
W ¡
14 ¡
Cache Line Model
15 ¡
16 ¡
Created a database of manually-validated cache contention bugs
17 ¡
False Negative False Positive
Runnable Benchmarks
LASER 24 33/33 VTUNE 1 64 33/33 SHERIFF 3 4 12/33
0 ¡ 0.5 ¡ 1 ¡ 1.5 ¡ 2 ¡ 2.5 ¡ 3 ¡ 3.5 ¡ 4 ¡ 4.5 ¡ 5 ¡
Slowdowns X
(1.8x)
18 ¡
19 ¡
Cache
20 ¡
Core Core 1 Write X,2 Read X
Tail Tail Cache X=2 ¡ Store Buffer 0 Store Buffer 1
Read X=0
… ¡ … ¡ X=1 ¡ … ¡ … ¡ … ¡
Read X Read X=2 Flush
Shared Modified
X=0 ¡
Invalid
X=0 ¡
Flush at synchronization points for TSO compliance and basic block end for performance.
speedup.
coalescing violates TSO. E.g. Sheriff does not provide TSO compliance.
21 ¡
22 ¡
Result = SSB[X] If (Result == null) Result = *X; Return Result;
If (SSB[X] == null && SSB.full()) Flush(); SSB[X] = Val;
TSX_Begin_Transaction Foreach pair in SSB *pair.memory = pair.value; TSX_End_Transaction Redo_TSX_Transaction_If_Fa ils
23 ¡ 1.19 1.15 Linear_Regression ¡ histogram ¡
Automatic Repair
1.04 1.04 1.16 1.37 16.92 5.83 kmeans ¡ reverse_index ¡ dedup ¡ lu_ncb ¡ Linear_Regression ¡ histogram ¡
Manual Repair
24 ¡
REMIX: Online Detection and Repair of Cache Contention for the JVM
[PLDI 2016] Add to read list Researchers ¡Who ¡Read ¡This ¡Paper ¡Also ¡Read ¡