hardware read-write lock elision - inesc-idsalaa/slides/eurosys2016.pdf · hardware read-write lock...
TRANSCRIPT
![Page 1: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/1.jpg)
HardwareRead-WriteLockElision
PascalFelberShadyIssa
PaoloRomanoAlexanderMatveev
![Page 2: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/2.jpg)
Multicoresareeverywhere
HardwareRead-WriteLockElision- Eurosys201621/4/16 2
![Page 3: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/3.jpg)
Parallelprogramming
Mainmemory
Core1 Core2 Core3 Core4
HardwareRead-WriteLockElision- Eurosys201621/4/16 3
![Page 4: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/4.jpg)
Parallelprogramming
Mainmemory
Core1 Core2 Core3 Core4
HardwareRead-WriteLockElision- Eurosys201621/4/16 4
![Page 5: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/5.jpg)
Parallelprogramming
Mainmemory
Core1 Core2 Core3 Core4
complexity- deadlocks- livelocks- priorityinversions- convoyeffects
HardwareRead-WriteLockElision- Eurosys201621/4/16 5
![Page 6: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/6.jpg)
Parallelprogramming
Mainmemory
Core1 Core2 Core3 Core4
Transactionalmemory
atomic{if(bal>amount)
withdraw(amount)}
HardwareRead-WriteLockElision- Eurosys201621/4/16 6
![Page 7: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/7.jpg)
HardwareTransactionalMemory
HardwareRead-WriteLockElision- Eurosys201621/4/16 7
![Page 8: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/8.jpg)
Hardwarelockelision
Thread1lock
r(A)
unlock
w(B)
lock
w(X) w(Y)
unlockThread2
lock
HardwareRead-WriteLockElision- Eurosys201621/4/16 8
![Page 9: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/9.jpg)
Hardwarelockelision
Thread1lock
r(A)
unlock
w(B)
lock
w(X) w(Y)
unlockThread2
BeginH/WTx
CommitH/WTx
BeginH/WTx
CommitH/WTx
HardwareRead-WriteLockElision- Eurosys201621/4/16 9
![Page 10: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/10.jpg)
Hardwarelockelision
Thread1lock
r(A) r(X)
lock
w(X)Thread2
BeginH/WTx
BeginH/WTx
abortacquirelock
normally
HardwareRead-WriteLockElision- Eurosys201621/4/16 10
![Page 11: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/11.jpg)
Hardwarelockelision
Thread1lock
r(A) r(X)
lock
w(X)Thread2
BeginH/WTx
BeginH/WTx
abortacquirelock
normally
capacityprohibited instructions
pagefaultsTLBmiss
HardwareRead-WriteLockElision- Eurosys201621/4/16 11
![Page 12: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/12.jpg)
Read-writeLocks
readmode writemode
concurrentreaders
✔ sequentialwriters✘
readdominatedworkloads
blocksreaders✘
HardwareRead-WriteLockElision- Eurosys201621/4/16 12
![Page 13: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/13.jpg)
Hardwareread-writelockelision
readersrunwithoutinstrumentation:• noH/WTxs• noS/Wtrackingof
readlocations• nolockacquisition
writersruninH/WTxs:• nolockacquisition• H/Wtrackingof
read/writelocations
HardwareRead-WriteLockElision- Eurosys201621/4/16 13
![Page 14: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/14.jpg)
Hardwareread-writelockelision
Reader
Writer
r-lock
r(X)
r-unlock
r(?)
w-lock
w(X) w(Y)
w-unlockBeginHWTx
CommitHW Tx
HardwareRead-WriteLockElision- Eurosys201621/4/16 14
![Page 15: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/15.jpg)
Hardwareread-writelockelision
Reader
Writer
r-lock
r(X)
r-unlock
r(?)
w-lock
w(X) w(Y)
w-unlock
?=Y
BeginH/WTx
CommitH/WTx
HardwareRead-WriteLockElision- Eurosys201621/4/16 15
![Page 16: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/16.jpg)
Hardwareread-writelockelision
Reader
Writer
r-lock
r(X)
r-unlock
r(?)
w-lock
w(X) w(Y)
w-unlock
?=Y
w-unlockBeginH/WTx
CommitH/WTx
HardwareRead-WriteLockElision- Eurosys201621/4/16 16
![Page 17: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/17.jpg)
Hardwareread-writelockelision
Reader
Writer
r-lock
r(X)
r-unlock
r(Y)
w-lock
w(X) w(Y)
w-unlockabort
BeginH/WTx
CommitH/WTx
HardwareRead-WriteLockElision- Eurosys201621/4/16 17
![Page 18: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/18.jpg)
Hardwareread-writelockelision
Reader
Writer
r-lock
r(X)
r-unlock
r(?)
w-lock
w(X) w(Y)
w-unlock w-unlock
waitforconcurrentreadersactivehere
BeginH/WTx
CommitH/WTx
HardwareRead-WriteLockElision- Eurosys201621/4/16 18
![Page 19: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/19.jpg)
Hardwareread-writelockelisionR1
Writer
r-unlock
r-unlock
w-unlock w-unlock
reader state
R1 inactive
R2 active
. .
R2r-lock
reader state
R1 inactive
R2 inactive
. .
abortHardwareRead-WriteLockElision- Eurosys201621/4/16 19
![Page 20: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/20.jpg)
Hardwareread-writelockelision
Reader
Writer
r-lock
r(X)
r-unlock
r(?)
w-lock
w(X) w(Y)
SuspendHWTx
ResumeHWTx
CommitHWTx
w-unlockBeginHWTx
waitforconcurrentreadersactivehere
HardwareRead-WriteLockElision- Eurosys201621/4/16 20
![Page 21: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/21.jpg)
Hardwareread-writelockelisionWritesuseH/WTxs
concurrencyamongwriters
✔ Txs maynevercommit• fallbacklockisamust• Readersmustsynchronize
withlockholder
✘
HardwareRead-WriteLockElision- Eurosys201621/4/16 21
![Page 22: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/22.jpg)
Hardwareread-writelockelision
Reader
Writerinlockfallback
r-lock
r(X)
r-unlock
w-lock
w(X) w(Y)
waitforconcurrentreaders
Releaselock
w-unlockAcquirelock
r(Y)
r-lock
waitforlockchecklock
oldX
HardwareRead-WriteLockElision- Eurosys201621/4/16 22
![Page 23: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/23.jpg)
RollbackOnlyTransactions
Thread1lock
r(X)
lock
w(X)Thread2
BeginH/WTx
BeginH/WTx
abortlock
r(X)
lock
w(X)
BeginROT
BeginROT
r(X)
unlockCommitROT
unlockCommitROT
HardwareRead-WriteLockElision- Eurosys201621/4/16 23
![Page 24: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/24.jpg)
RollbackOnlyTransactions
Thread1lock
r(X)
lock
w(X)Thread2
BeginH/WTx
BeginH/WTx
abortlock
r(X)
lock
w(X)
BeginROT
BeginROT
r(X)
unlockCommitROT
unlockCommitROT
oldX
newX
HardwareRead-WriteLockElision- Eurosys201621/4/16 24
![Page 25: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/25.jpg)
UsingRollbackOnlyTransactions(ROTs)
atomic✔ notrackingofreads✘
notserializable✘allowlargerTxs✔
noneedforSuspend/Resume✔ singlewriter✘
HardwareRead-WriteLockElision- Eurosys201621/4/16 25
![Page 26: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/26.jpg)
Experiments
syntheticbenchmarks
degreeofcontention
lengthofTransactions
complexbenchmarks
andapplications
STMBench7
TPC-C
KyotoCabinet
10cores
80H/Wthreads
HardwareRead-WriteLockElision- Eurosys201621/4/16 26
![Page 27: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/27.jpg)
0.1
1
16 32 64 80
Tim
e (
s)
Number of threads
10% write locks
RW-LEOPT
RW-LEPES
HLE
BRLock
RWL
SGL
HTM
ROT
GL
ROT
GL
Optimistic Pessimestic
HardwareRead-WriteLockElision- Eurosys201621/4/16 27
![Page 28: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/28.jpg)
0.1
1
16 32 64 80
Tim
e (
s)
Number of threads
10% write locks
RW-LEOPT
RW-LEPES
HLE
BRLock
RWL
SGL
HTM
ROT
GL
ROT
GL
Optimistic Pessimestic
HardwareRead-WriteLockElision- Eurosys201621/4/16 28
![Page 29: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/29.jpg)
Syntheticbenchmarks
Degreeofcontention
SizeofTxs
0.1
1
16 32 64 80
Tim
e (
s)
Number of threads
10% write locks
RW-LEOPT
RW-LEPES
HLE
BRLock
RWL
SGL
HardwareRead-WriteLockElision- Eurosys201621/4/16 29
![Page 30: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/30.jpg)
Stresstest– performance
Lowcontention Highcontention
SmallTxs
LargeTxs
0.1
1
16 32 64 80
Tim
e (
s)
Number of threads
10% write locks
RW-LEOPT
RW-LEPES
HLE
BRLock
RWL
SGL
10%writers
0.01
0.1
1
16 32 64 80
Tim
e (
s)
Number of threads
0.1
1
16 32 64 80
Tim
e (
s)
Number of threads
RW-LEOPT
RW-LEPES
HLEBRLock
RWLSGL
0.1
1
16 32 64 80
Tim
e (
s)
Number of threads
0.1
1
10
16 32 64 80
Tim
e (
s)
Number of threads
8X
10X
7X
HardwareRead-WriteLockElision- Eurosys201621/4/16 30
![Page 31: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/31.jpg)
Ab
ort
s (%
)
HLERW-LEPES
RW-LEOPT
Abort
s (%
)
HLERW-LEPES
RW-LEOPT
Stresstest– abortrate
Lowcontention Highcontention
SmallTxs
LargeTxs
10%writers
HTM tx
HTM non-tx
HTM capacity
Lock aborts
ROT conflicts
ROT capacity
HLERW-LEPES
RW-LEOPT
Ab
ort
s (%
)
HLERW-LEPES
RW-LEOPT
Ab
ort
s (%
)
HLERW-LEPES
RW-LEOPT HardwareRead-WriteLockElision- Eurosys201621/4/16 31
![Page 32: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/32.jpg)
Stresstest
Lowcontention Highcontention
SmallTxs
LargeTxs
0.1
1
16 32 64 80
Tim
e (
s)
Number of threads
10% write locks
RW-LEOPT
RW-LEPES
HLE
BRLock
RWL
SGL
90%writers
0.1
1
16 32 64 80
Tim
e (
s)
Number of threads
RW-LEOPT
RW-LEPES
HLEBRLock
RWLSGL
0.01
0.1
1
16 32 64 80
Tim
e (
s)
Number of threads
0.1
1
10
100
16 32 64 80
Tim
e (
s)
Number of threads
0.1
1
10
16 32 64 80
Tim
e (
s)
Number of threads
-10%-25%
HardwareRead-WriteLockElision- Eurosys201621/4/16 32
![Page 33: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/33.jpg)
Syntheticbenchmarks
Lowcontention Highcontention
Lowcapacity
Highcapacity
0
20
40
60
80
1001% write locks
Com
mits
(%
)
HTM ROT SGL Uninstrumented
HLERW-LEPES
RW-LEOPT
10% write locks
Number of threads (2,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
90% write locks
HLERW-LEPES
RW-LEOPT
0
20
40
60
80
1001% write locks
Com
mits
(%
)
HTM ROT SGL Uninstrumented
HLERW-LEPES
RW-LEOPT
10% write locks
Number of threads (2,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
90% write locks
HLERW-LEPES
RW-LEOPT
0
20
40
60
80
1001% write locks
Com
mits
(%
)
HTM ROT SGL Uninstrumented
HLERW-LEPES
RW-LEOPT
10% write locks
Number of threads (2,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
90% write locks
HLERW-LEPES
RW-LEOPT
0
20
40
60
80
1001% write locks
Com
mits
(%
)
HTM ROT SGL Uninstrumented
HLERW-LEPES
RW-LEOPT
10% write locks
Number of threads (2,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
90% write locks
HLERW-LEPES
RW-LEOPT
HardwareRead-WriteLockElision- Eurosys201621/4/16 33
![Page 34: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/34.jpg)
Syntheticbenchmarks
Lowcontention Highcontention
Lowcapacity
Highcapacity
0
20
40
60
80
1001% write locks
Abort
s (%
)
HTM txHTM non-txHTM capacityLock abortsROT conflictsROT capacity
HLERW-LEPES
RW-LEOPT
10% write locks
Number of threads (2,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
90% write locks
HLERW-LEPES
RW-LEOPT
0
20
40
60
80
1001% write locks
Abort
s (%
)
HTM txHTM non-txHTM capacityLock abortsROT conflictsROT capacity
HLERW-LEPES
RW-LEOPT
10% write locks
Number of threads (2,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
90% write locks
HLERW-LEPES
RW-LEOPT
0
20
40
60
80
1001% write locks
Ab
ort
s (%
)
HTM txHTM non-txHTM capacityLock abortsROT conflictsROT capacity
HLERW-LEPES
RW-LEOPT
10% write locks
Number of threads (2,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
90% write locks
HLERW-LEPES
RW-LEOPT
0
20
40
60
80
1001% write locks
Ab
ort
s (%
)
HTM txHTM non-txHTM capacityLock abortsROT conflictsROT capacity
HLERW-LEPES
RW-LEOPT
10% write locks
Number of threads (2,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
90% write locks
HLERW-LEPES
RW-LEOPT
HardwareRead-WriteLockElision- Eurosys201621/4/16 34
![Page 35: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/35.jpg)
TPC-C
0.1
1
10
100
16 32 64 80
1% write locks
Speedup (
vs. S
GL 1
thr.
)
16 32 64 80
10% write locks
Number of threads
RW-LEOPT
RW-LEPES
16 32 64 80
50% write locks
HLE BRLock
RWL SGL
6X
HardwareRead-WriteLockElision- Eurosys201621/4/16 35
![Page 36: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/36.jpg)
TPC-C
0
20
40
60
80
1001% write locks
Co
mm
its (
%)
HTM ROT SGL Uninstrumented
HLERW-LEPES
RW-LEOPT
10% write locks
Number of threads (1,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
90% write locks
HLERW-LEPES
RW-LEOPT
HardwareRead-WriteLockElision- Eurosys201621/4/16 36
![Page 37: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/37.jpg)
TPC-C
0
20
40
60
80
1001% write locks
Abort
s (%
)
HTM txHTM non-txHTM capacityLock abortsROT conflictsROT capacity
HLERW-LEPES
RW-LEOPT
10% write locks
Number of threads (1,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
50% write locks
HLERW-LEPES
RW-LEOPT
HardwareRead-WriteLockElision- Eurosys201621/4/16 37
![Page 38: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/38.jpg)
STMbench7
0
2
4
6
8
10
16 32 64 80
10% write locks
Thro
ughput (1
03 T
x/s)
16 32 64 80
50% write locks
Number of threads
RW-LEOPT
RW-LEPES
16 32 64 80
90% write locks
HLE BRLock
RWL SGL
4X
HardwareRead-WriteLockElision- Eurosys201621/4/16 38
![Page 39: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/39.jpg)
STMbench7
0
20
40
60
80
10010% write locks
Com
mits
(%
)
HTM ROT SGL Uninstrumented
HLERW-LEPES
RW-LEOPT
50% write locks
Number of threads (2,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
90% write locks
HLERW-LEPES
RW-LEOPT
HardwareRead-WriteLockElision- Eurosys201621/4/16 39
![Page 40: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/40.jpg)
STMbench7
0
20
40
60
80
10010% write locks
Abort
s (%
)
HTM txHTM non-txHTM capacityLock abortsROT conflictsROT capacity
HLERW-LEPES
RW-LEOPT
50% write locks
Number of threads (2,4,8,16,32,64,80)
HLERW-LEPES
RW-LEOPT
90% write locks
HLERW-LEPES
RW-LEOPT
HardwareRead-WriteLockElision- Eurosys201621/4/16 40
![Page 41: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/41.jpg)
KyotoCabinet
0
2
4
6
8
16 32 64
<1% write locks
Thro
ughput (1
06 T
x/s)
16 32 64
5% write locks
Number of threads
RW-LEOPT
RW-LEPES
16 32 64
10% write locks
HLEBRLock
OrigSGL
2X
HardwareRead-WriteLockElision- Eurosys201621/4/16 41
![Page 42: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/42.jpg)
KyotoCabinet
0
20
40
60
80
100<1% write locks
Com
mits
(%
)
HTM ROT SGL Uninstrumented
HLERW-LEPES
RW-LEOPT
5% write locks
Number of threads (1,4,8,16,32,64)
HLERW-LEPES
RW-LEOPT
10% write locks
HLERW-LEPES
RW-LEOPT
HardwareRead-WriteLockElision- Eurosys201621/4/16 42
![Page 43: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/43.jpg)
KyotoCabinet
0
10
20
30
40
50<1% write locks
Abort
s (%
)
HTM txHTM non-txHTM capacityLock abortsROT conflictsROT capacity
HLERW-LEPES
RW-LEOPT
5% write locks
Number of threads (1,4,8,16,32,64)
HLERW-LEPES
RW-LEOPT
10% write locks
HLERW-LEPES
RW-LEOPT
HardwareRead-WriteLockElision- Eurosys201621/4/16 43
![Page 44: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/44.jpg)
Conclusions
readerswithoutinstrumentation
writersusingH/WTx
HardwareRead-WriteLockElision- Eurosys201621/4/16 44
![Page 45: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/45.jpg)
Conclusions
readerswithoutinstrumentation
writersusingH/WTx 10X
HardwareRead-WriteLockElision- Eurosys201621/4/16 45
![Page 46: Hardware Read-Write Lock Elision - INESC-IDsalaa/slides/eurosys2016.pdf · Hardware read-write lock elision R1 Writer r-unlock r-unlock w-unlock w-unlock reader state R1 inactive](https://reader030.vdocument.in/reader030/viewer/2022040215/5ed51d2773d7eb5ba20b7f23/html5/thumbnails/46.jpg)
Conclusions
readerswithoutinstrumentation
writersusingH/WTx
suspend/resume ROTs
10xHardwareRead-WriteLockElision- Eurosys201621/4/16 46