Interval-Based Memory Reclamation
Haosen Wen, Joseph Izraelevitz, Wentao Cai,
- H. Alan Beadle and Michael L. Scott
University of Rochester PPoPP’18
Interval-Based Memory Reclamation Haosen Wen , Joseph Izraelevitz, - - PowerPoint PPT Presentation
Interval-Based Memory Reclamation Haosen Wen , Joseph Izraelevitz, Wentao Cai, H. Alan Beadle and Michael L. Scott University of Rochester PPoPP18 Background Unlike lock-based concurrent data Thread 2 structures, non-blocking ones
University of Rochester PPoPP’18
reclaim a block while others still have access to it.
A B
Thread 1 Thread 2
[Hart et al., 2007] only issues memory fences at
B A C A B
Reserved by Thread 1
B C
Reserved by Thread 2
Store-load Fence by T1 B A C C B
Reserved by Thread 1
B C
Reserved by Thread 2 Reclaimable
traversing a linked list and Thread 2 is retiring block A.
array of HPs are reserved from reclamations.
are issued on every HP update.
thread is usually small, but can be unbounded in some cases.
Not reclaimable
B A C 1
Reserved by Thread 1
2
a slow-ticking "clock"
current epoch E in reservation at the beginning of
all objects retired on and after epoch E.
blocks retired before the lowest reservation can be reclaimed.
Not reclaimable
Epochs Block A 1 2 3 4
Epoch: 2
Block B
Lowest reservation: 1
Reserved by Thread 2 Thread 1 Thread 2
A 1
Reserved by Thread 1
a slow-ticking "clock"
current epoch E in reservation at the beginning of
all objects retired on and after epoch E.
blocks retired before the lowest reservation can be reclaimed.
up if some thread is stalled: EBR is not robust to thread stalling.
Not reclaimable Epochs Block A 1 2 3 4
Epoch: 5
Block B Lowest reservation: 1
Zzzzzz... B C ...
Block C
Block D
D
A 2
Reserved by Thread 1
interval (hence the name) of all blocks.
if its life interval does not intersect with reservations of any thread.
each thread contains a fnite range of epochs; a stalled thread won’t reserve any block born after the upper bound of its reservation.
upper reservation as it progresses.
Not reclaimable
Epochs Block A 1 2 3 4
Epoch: 5
Block B Reserved epochs: [1, 2]
Zzzzzz... B C ...
Block C
1
1 1
Epochs Block A 1 2 3 4
Thread 1 Read(A) 2 1
Epochs Block A 1 2 3 4
Birth: 1 (Data) T ag:2 Birth: 2 (Data) T ag Block A
1 1
Epochs Block A 1 2 3 4
Thread 1 Read(A) 4 1
Epochs Block A 1 2 3 4
Epoch: 4 Birth: 1 (Data) Birth: 2 (Data) Block A *with diferent T agIBR variants.
agIBR-FAA, T agIBR-WCAS in paper.)
4000 6000 1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95100
Threads
TagIBR 2GEIBR HP
Average retired-but-not-reclaimed objects per operation
Natarajan & Mittal’s Tree
Number of hardware contexts Threads exceeding 72 get stalled
20 30 40 50 1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95100
Threads Throughput (M ops/sec)
EBR TagIBR 2GEIBR HP
Throughput (M ops/s)
Natarajan & Mittal’s Tree
Number of hardware contexts
Throughput (M ops/s)
Michael’s Linked List
0.025 0.050 0.075 0.100 1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95100
Threads Throughput (M ops/sec)
EBR TagIBR 2GEIBR HP