dhtm: durable hardware transactional memory · arpit joshi, vijay nagarajan, marcelo cintra,...
TRANSCRIPT
![Page 1: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/1.jpg)
Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas
DHTM: Durable Hardware Transactional Memory
ISCA 2018
![Page 2: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/2.jpg)
Persistent Memory is here…
!2
![Page 3: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/3.jpg)
Persistent Memory is here…
!2
![Page 4: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/4.jpg)
Persistent Memory SystemsL1
LLC
Persistent Memory
L1
!3
![Page 5: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/5.jpg)
Persistent Memory SystemsL1
LLC
Persistent Memory
L1• Persistent Memory
- Non-volatility over the memory bus- Load/Store interface to persistent data
!3
![Page 6: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/6.jpg)
Persistent Memory SystemsL1
LLC
Persistent Memory
L1• Persistent Memory
- Non-volatility over the memory bus- Load/Store interface to persistent data
!3
System Crashes
![Page 7: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/7.jpg)
Persistent Memory SystemsL1
LLC
Persistent Memory
L1• Persistent Memory
- Non-volatility over the memory bus- Load/Store interface to persistent data
• Crash Consistency- Is the persistent state consistent?- Programming Model: ACID Transactions
!3
System Crashes
![Page 8: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/8.jpg)
Persistent Memory SystemsL1
LLC
Persistent Memory
L1• Persistent Memory
- Non-volatility over the memory bus- Load/Store interface to persistent data
• Crash Consistency- Is the persistent state consistent?- Programming Model: ACID Transactions
!3
System Crashes
“Ensuring failure atomicity for all this computation without failure-atomic transactions is practically infeasible, if not impossible.”
Marathe et al. [HotStorage’17]
![Page 9: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/9.jpg)
Persistent Memory SystemsL1
LLC
Persistent Memory
L1• Persistent Memory
- Non-volatility over the memory bus- Load/Store interface to persistent data
• Crash Consistency- Is the persistent state consistent?- Programming Model: ACID Transactions
!3
System Crashes
“Ensuring failure atomicity for all this computation without failure-atomic transactions is practically infeasible, if not impossible.”
Marathe et al. [HotStorage’17]
How fast can we support ACID?
![Page 10: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/10.jpg)
ACID TransactionsL1
LLC
Persistent Memory
L1
!4
![Page 11: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/11.jpg)
ACID TransactionsL1
LLC
Persistent Memory
L1
!4
Atomic Visibility
![Page 12: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/12.jpg)
ACID TransactionsL1
LLC
Persistent Memory
L1
!4
Atomic Visibility
Atomic Durability
![Page 13: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/13.jpg)
ACID TransactionsL1
LLC
Persistent Memory
L1
!4
Atomic Visibility
Atomic Durability
Locks HTMSTM
![Page 14: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/14.jpg)
ACID TransactionsL1
LLC
Persistent Memory
L1
!4
Atomic Visibility
Atomic Durability
Locks HTMSTM
Check-pointing
H/W Logging
S/WLogging
![Page 15: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/15.jpg)
ACID TransactionsL1
LLC
Persistent Memory
L1
!4
Atomic Visibility
Atomic Durability
Locks HTMSTM
Check-pointing
H/W Logging
S/WLogging
![Page 16: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/16.jpg)
Atomic Visibility: HTM
!5
![Page 17: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/17.jpg)
Atomic Visibility: HTM
• Commercial HTMs [Intel, IBM]
!5
L1 Cache
Cache Line
A = 15
R
B = 20
W
11
![Page 18: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/18.jpg)
Atomic Visibility: HTM
• Commercial HTMs [Intel, IBM]- Version Management: read/write sets in
L1 cache
!5
L1 Cache
Cache Line
A = 15
R
B = 20
W
11
![Page 19: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/19.jpg)
Atomic Visibility: HTM
• Commercial HTMs [Intel, IBM]- Version Management: read/write sets in
L1 cache- Conflict Detection: piggy back on the
coherence protocol
!5
L1 Cache
Cache Line
A = 15
R
B = 20
W
11
![Page 20: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/20.jpg)
Atomic Visibility: HTM
• Commercial HTMs [Intel, IBM]- Version Management: read/write sets in
L1 cache- Conflict Detection: piggy back on the
coherence protocol- Commit: make updates non-speculative
!5
L1 Cache
Cache Line
A = 15
R
B = 20
W
![Page 21: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/21.jpg)
Atomic Visibility: HTM
• Commercial HTMs [Intel, IBM]- Version Management: read/write sets in
L1 cache- Conflict Detection: piggy back on the
coherence protocol- Commit: make updates non-speculative- Abort: invalidate write set
!5
L1 Cache
Cache Line R
B = 20
W
![Page 22: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/22.jpg)
Atomic Visibility: HTM
• Commercial HTMs [Intel, IBM]- Version Management: read/write sets in
L1 cache- Conflict Detection: piggy back on the
coherence protocol- Commit: make updates non-speculative- Abort: invalidate write set
!5
L1 Cache
Cache Line R
B = 20
W
Write-sets in commercial HTMs limited by the size of the L1 cache.
![Page 23: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/23.jpg)
Atomic Durability: Logging
!6
![Page 24: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/24.jpg)
Atomic Durability: Logging
• Logging for durability [Doshi’16, Joshi’17, Shin’17, Ogleari’18]
!6
Persistent Memory
In-place Values
A = 10B = 20C = 30
![Page 25: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/25.jpg)
Atomic Durability: Logging
• Logging for durability [Doshi’16, Joshi’17, Shin’17, Ogleari’18]- Write a log entry for every update
!6
Persistent Memory
In-place Values
A = 10B = 20C = 30
Transaction Log
A = 15B = 25
![Page 26: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/26.jpg)
Atomic Durability: Logging
• Logging for durability [Doshi’16, Joshi’17, Shin’17, Ogleari’18]- Write a log entry for every update- Commit: Update the values in-place
!6
Persistent Memory
In-place Values
A = 15B = 25C = 30
Transaction Log
![Page 27: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/27.jpg)
Atomic Durability: Logging
• Logging for durability [Doshi’16, Joshi’17, Shin’17, Ogleari’18]- Write a log entry for every update- Commit: Update the values in-place- Abort: Undo any in-place updates
!6
Persistent Memory
In-place Values
A = 15B = 25C = 30
Transaction Log
A = 10B = 20
![Page 28: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/28.jpg)
Atomic Durability: Logging
• Logging for durability [Doshi’16, Joshi’17, Shin’17, Ogleari’18]- Write a log entry for every update- Commit: Update the values in-place- Abort: Undo any in-place updates
!6
Persistent Memory
In-place Values
A = 15B = 25C = 30
Transaction Log
A = 10B = 20
In-place updates in the critical path of commit High memory write bandwidth requirement
![Page 29: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/29.jpg)
ACID = HTM + Logging
Goals:- Support fast commits - Minimise memory bandwidth consumption- Extend the supported transaction size- Maintain the simplicity of commercial HTMs
!7
![Page 30: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/30.jpg)
DHTM: Durable Hardware Transactional Memory
L1
LLC
Persistent Memory
L1
!8
Log Writes
![Page 31: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/31.jpg)
Commercial HTM + Hardware Redo Log
DHTM: Durable Hardware Transactional Memory
L1
LLC
Persistent Memory
L1
!8
Log Writes
![Page 32: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/32.jpg)
Commercial HTM + Hardware Redo Log- H/W Redo Log + Log Buffer
Reduced memory bandwidth Fast commits
DHTM: Durable Hardware Transactional Memory
L1
LLC
Persistent Memory
L1
!8
Log Writes
![Page 33: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/33.jpg)
Commercial HTM + Hardware Redo Log- H/W Redo Log + Log Buffer
Reduced memory bandwidth Fast commits
- H/W Log + Sticky State Extended transaction size to the LLC Simplicity of commercial HTM
DHTM: Durable Hardware Transactional Memory
L1
LLC
Persistent Memory
L1
!8
Log Writes
![Page 34: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/34.jpg)
!9
L1
LLC
Persistent Memory
L1
Log Writes
DHTM: Log Buffer
![Page 35: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/35.jpg)
!9
L1
LLC
Persistent Memory
L1• Redo Log Bandwidth Problem
Log Writes
DHTM: Log Buffer
![Page 36: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/36.jpg)
!9
L1
LLC
Persistent Memory
L1• Redo Log Bandwidth Problem
- write a log entry for every storeLog Writes
DHTM: Log Buffer
![Page 37: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/37.jpg)
!9
L1
LLC
Persistent Memory
L1• Redo Log Bandwidth Problem
- write a log entry for every store- multiple stores create multiple log entriesLog Writes
DHTM: Log Buffer
![Page 38: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/38.jpg)
!9
L1
LLC
Persistent Memory
L1• Redo Log Bandwidth Problem
- write a log entry for every store- multiple stores create multiple log entries
• Solution: Log Buffer
Log Writes
DHTM: Log Buffer
![Page 39: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/39.jpg)
!9
L1
LLC
Persistent Memory
L1• Redo Log Bandwidth Problem
- write a log entry for every store- multiple stores create multiple log entries
• Solution: Log Buffer - track cache lines being modified
Log Writes
DHTM: Log Buffer
![Page 40: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/40.jpg)
!9
L1
LLC
Persistent Memory
L1• Redo Log Bandwidth Problem
- write a log entry for every store- multiple stores create multiple log entries
• Solution: Log Buffer - track cache lines being modified- multiple writes coalesced in a log entry
Log Writes
DHTM: Log Buffer
![Page 41: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/41.jpg)
!9
L1
LLC
Persistent Memory
L1• Redo Log Bandwidth Problem
- write a log entry for every store- multiple stores create multiple log entries
• Solution: Log Buffer - track cache lines being modified- multiple writes coalesced in a log entry - log entry written to persistent memory on eviction
from log buffer
Log Writes
DHTM: Log Buffer
![Page 42: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/42.jpg)
DHTM: Transaction States
!10
![Page 43: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/43.jpg)
DHTM: Transaction States
!10
Active
Begin Transaction
![Page 44: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/44.jpg)
DHTM: Transaction States
!10
Active Commit
Begin Transaction
End Transaction&
Log RecordsPersisted
![Page 45: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/45.jpg)
DHTM: Transaction States
!10
Active Commit CommitComplete
Begin Transaction
End Transaction&
Log RecordsPersisted
In-place DataPersisted
![Page 46: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/46.jpg)
DHTM: Transaction States
!10
Active Commit CommitComplete
Abort
Begin Transaction
End Transaction&
Log RecordsPersisted
In-place DataPersisted
Conflict
![Page 47: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/47.jpg)
DHTM: Commit ExampleL1 Cache
Cache Line R W
Persistent Memory
In-place Values
A = 15B = 25A = 10B = 20C = 30
Transaction Log
A = 10B = 20
State
Log Buffer Begin_Transaction
Write (A=15)
Read (B)
Write (B=25)
End_Transaction
!11
![Page 48: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/48.jpg)
Active
DHTM: Commit ExampleL1 Cache
Cache Line R W
Persistent Memory
In-place Values
A = 15B = 25A = 10B = 20C = 30
Transaction Log
A = 10B = 20
State
Log Buffer Begin_Transaction
Write (A=15)
Read (B)
Write (B=25)
End_Transaction
!11
![Page 49: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/49.jpg)
ActiveActive
DHTM: Commit ExampleL1 Cache
Cache Line R W
Persistent Memory
In-place Values
A = 15B = 25A = 10B = 20C = 30
Transaction Log
A = 10B = 20
State
Log Buffer Begin_Transaction
Write (A=15)
Read (B)
Write (B=25)
End_Transaction
!11
A = 15 1A
![Page 50: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/50.jpg)
ActiveActive
DHTM: Commit ExampleL1 Cache
Cache Line R W
Persistent Memory
In-place Values
A = 15B = 25A = 10B = 20C = 30
Transaction Log
A = 10B = 20
State
Log Buffer Begin_Transaction
Write (A=15)
Read (B)
Write (B=25)
End_Transaction
!11
A = 15 1A
A = 15 1AB = 20 1
![Page 51: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/51.jpg)
ActiveActive
DHTM: Commit ExampleL1 Cache
Cache Line R W
Persistent Memory
In-place Values
A = 15B = 25A = 10B = 20C = 30
Transaction Log
A = 10B = 20
State
Log Buffer Begin_Transaction
Write (A=15)
Read (B)
Write (B=25)
End_Transaction
!11
A = 15 1A
A = 15 1AB = 20B = 25 11 1
A = 15
B
![Page 52: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/52.jpg)
ActiveActiveCommit
DHTM: Commit ExampleL1 Cache
Cache Line R W
Persistent Memory
In-place Values
A = 15B = 25A = 10B = 20C = 30
Transaction Log
A = 10B = 20
State
Log Buffer Begin_Transaction
Write (A=15)
Read (B)
Write (B=25)
End_Transaction
!11
A = 15 1A
A = 15 1AB = 20B = 25 11 1
A = 15
B
B = 25
B = 25
A = 15
Commit
1
![Page 53: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/53.jpg)
ActiveActiveCommit
DHTM: Commit ExampleL1 Cache
Cache Line R W
Persistent Memory
In-place Values
A = 15B = 25A = 10B = 20C = 30
Transaction Log
A = 10B = 20
State
Log Buffer Begin_Transaction
Write (A=15)
Read (B)
Write (B=25)
End_Transaction
!11
A = 15 1A
A = 15 1AB = 20B = 25 11 1
A = 15
B
B = 25
B = 25
A = 15
CommitA = 15B = 25
Complete
CommitComplete
CommitB = 25
1
![Page 54: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/54.jpg)
DHTM: Supporting Overflow
!12
![Page 55: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/55.jpg)
DHTM: Supporting Overflow
• Problems with Overflow:
!12
![Page 56: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/56.jpg)
DHTM: Supporting Overflow
• Problems with Overflow:- Version Management:
- global operation on write-set on a commit/abort- overhead infeasible in larger caches (beyond L1)
!12
![Page 57: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/57.jpg)
DHTM: Supporting Overflow
• Problems with Overflow:- Version Management:
- global operation on write-set on a commit/abort- overhead infeasible in larger caches (beyond L1)
- Conflict Detection: - additional metadata to detect conflicts- increased complexity due to NACK based protocols
!12
![Page 58: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/58.jpg)
DHTM: Supporting Overflow
!13
![Page 59: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/59.jpg)
DHTM: Supporting Overflow
!13
• Solution
![Page 60: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/60.jpg)
DHTM: Supporting Overflow
!13
LLC
Persistent Memory
• Solution- Version Management:
- Overflow List
![Page 61: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/61.jpg)
DHTM: Supporting Overflow
!13
LLC
Persistent Memory
Overflow List
C
AB
• Solution- Version Management:
- Overflow List
![Page 62: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/62.jpg)
DHTM: Supporting Overflow
!13
LLC
Persistent Memory
Overflow List
C
AB
• Solution- Version Management:
- Overflow List
![Page 63: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/63.jpg)
DHTM: Supporting Overflow
!13
LLC
Persistent Memory
Overflow List
C
AB
• Solution- Version Management:
- Overflow List- Conflict Detection:
- maintain sticky state on overflow (similar to LogTM)
- avoid NACK by restricting overflow to LLC
![Page 64: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/64.jpg)
DHTM: Supporting Overflow
!13
LLC
Persistent Memory
Overflow List
C
AB
• Solution- Version Management:
- Overflow List- Conflict Detection:
- maintain sticky state on overflow (similar to LogTM)
- avoid NACK by restricting overflow to LLC
Further details on supporting overflows are in the paper.
![Page 65: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/65.jpg)
Evaluation
• System Configuration- We evaluate an 8-core machine with a 2-level cache hierarchy- HTM’s implement (first) writer wins conflict resolution policy
!14
Atomic Visibility Atomic Durability
ATOM Locks Hardware Undo Log
LogTM+ATOM HTM (LogTM) Hardware Undo Log
DHTM HTM Hardware Redo Log (Log Buffer)
![Page 66: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/66.jpg)
Evaluation
!15
![Page 67: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/67.jpg)
Evaluation
!15
1
1.25
1.5
1.75
2
queue hash sdg sps btree rbtree gmean
ATOM LogTM+ATOM DHTM
![Page 68: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/68.jpg)
Evaluation
!15
1
1.25
1.5
1.75
2
queue hash sdg sps btree rbtree gmean
ATOM LogTM+ATOM DHTM
![Page 69: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/69.jpg)
Evaluation
!15
1
1.25
1.5
1.75
2
queue hash sdg sps btree rbtree gmean
ATOM LogTM+ATOM DHTM
![Page 70: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/70.jpg)
Evaluation
!15
1
1.25
1.5
1.75
2
queue hash sdg sps btree rbtree gmean
ATOM LogTM+ATOM DHTM
26%
![Page 71: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/71.jpg)
Evaluation
!15
1
1.25
1.5
1.75
2
queue hash sdg sps btree rbtree gmean
ATOM LogTM+ATOM DHTM
17%
![Page 72: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/72.jpg)
Conclusion
• Persistent memory systems require crash consistency• ACID Transactions: widely understood crash consistency mechanism
• DHTM: ACID transactions in hardware- Atomic Visibility: commercial HTM- Atomic Durability: bandwidth optimized hardware redo log- Leverage hardware logging to extend transaction size unto LLC
!16
![Page 73: DHTM: Durable Hardware Transactional Memory · Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas DHTM: Durable Hardware Transactional Memory ISCA 2018](https://reader034.vdocuments.site/reader034/viewer/2022051903/5ff34ebd8c8b1e2e7c7c8ccd/html5/thumbnails/73.jpg)
Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas
DHTM: Durable Hardware Transactional Memory
ISCA 2018