MICRO-48 Efficient Persist Barriers for Multicores Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas
Summary • Efficient persist barrier • Used to implement persistency models • Persistency = when stores become durable (Consistency = when stores become visible) • Evaluated • Buffered Epoch Persistency • Bulk Strict Persistency December 9, 2015 MICRO-48 2
Persistent Memory Access Granularity Access Latency December 9, 2015 MICRO-48 3
Persistent Memory Access Granularity Secondary Storage DRAM Cache Access Latency December 9, 2015 MICRO-48 3
Persistent Memory Access Granularity PCM 3D Xpoint Secondary Storage STT-MRAM DRAM NVRAM Cache Access Latency December 9, 2015 MICRO-48 3
Persistent Memory Access Granularity PCM 3D Xpoint Secondary Storage STT-MRAM DRAM NVRAM Cache Access Latency Fast, fine grained persistence. December 9, 2015 MICRO-48 3
Persistent Memory Advantages : Unify memory and storage Access to persistent data through processor load/store interface Challenge : Maintaining consistency of data structures in memory December 9, 2015 MICRO-48 4
Consistency Challenge Core Cache DRAM Software Controlled Secondary Storage December 9, 2015 MICRO-48 5
Consistency Challenge Core Core Cache Cache Hardware Controlled DRAM NVRAM Software Controlled Secondary Storage Secondary Storage December 9, 2015 MICRO-48 5
Linked List - Naïve Cache HEAD Pseudo-code Node Node 1. Create Node 0 1 2. Update Node Pointer 3. Update Head Pointer HEAD Node Node 0 1 NVRAM December 9, 2015 MICRO-48 6
Linked List - Naïve Cache HEAD Pseudo-code Node Node Node 1. Create Node 0 1 2 2. Update Node Pointer 3. Update Head Pointer HEAD Node Node 0 1 NVRAM December 9, 2015 MICRO-48 6
Linked List - Naïve Cache HEAD Pseudo-code Node Node Node 1. Create Node 0 1 2 2. Update Node Pointer 3. Update Head Pointer HEAD Node Node Node 0 1 2 NVRAM December 9, 2015 MICRO-48 6
Linked List - Naïve Cache HEAD Pseudo-code Node Node Node 1. Create Node 0 1 2 2. Update Node Pointer 3. Update Head Pointer HEAD Node Node Node 0 1 2 NVRAM December 9, 2015 MICRO-48 6
Linked List - Naïve Cache Pseudo-code 1. Create Node System Crash! 2. Update Node Pointer 3. Update Head Pointer HEAD Node Node Node 0 1 2 NVRAM December 9, 2015 MICRO-48 6
Linked List - Failsafe Cache Pseudo-code HEAD 1. Create Node Node Node 0 1 2. Update Node Pointer 3. Persist Barrier HEAD 4. Update Head Pointer Node Node 0 1 NVRAM December 9, 2015 MICRO-48 7
Linked List - Failsafe Cache Pseudo-code HEAD 1. Create Node Node Node Node 0 1 2 2. Update Node Pointer 3. Persist Barrier HEAD 4. Update Head Pointer Node Node 0 1 NVRAM December 9, 2015 MICRO-48 7
Linked List - Failsafe Cache Pseudo-code HEAD 1. Create Node Node Node Node 0 1 2 2. Update Node Pointer 3. Persist Barrier HEAD 4. Update Head Pointer Node Node Node 0 1 2 NVRAM December 9, 2015 MICRO-48 7
Linked List - Failsafe Cache Pseudo-code HEAD 1. Create Node Node Node Node 0 1 2 2. Update Node Pointer 3. Persist Barrier HEAD 4. Update Head Pointer Node Node Node 0 1 2 NVRAM December 9, 2015 MICRO-48 7
Linked List - Failsafe Cache Pseudo-code HEAD 1. Create Node Node Node Node 0 1 2 2. Update Node Pointer 3. Persist Barrier HEAD 4. Update Head Pointer Node Node Node 0 1 2 NVRAM December 9, 2015 MICRO-48 7
Linked List - Failsafe Pseudo-code 1. Create Node Epoch A 2. Update Node Pointer 3. Persist Barrier 4. Update Head Pointer Epoch B December 9, 2015 MICRO-48 8
Linked List - Failsafe Pseudo-code 1. Create Node 2. Update Node Pointer Programmer 3. Persist Barrier Introduced 4. Update Head Pointer December 9, 2015 MICRO-48 8
Linked List - Failsafe Pseudo-code 1. Create Node 2. Update Node Pointer Programmer 3. Persist Barrier Introduced 4. Update Head Pointer Divide program execution into epochs through programmer inserted persist barriers = Epoch Persistence December 9, 2015 MICRO-48 8
Epoch Persistence* St a St b St c St a Epoch 1 Epoch 2 Epoch 3 Persist Barrier a b c a d e d p q d Visibility St d St e b a c d e Persistence St d Persist Barrier St p St q St d … * Pelley et. al., “Memory Persistency”, in ISCA-2014. December 9, 2015 MICRO-48 9
Epoch Persistence* St a St b St c St a Epoch 1 Epoch 2 Epoch 3 Persist Barrier a b c a d e d p q d Visibility St d St e b a c d e Persistence St d Persist Barrier St p St q St d … * Pelley et. al., “Memory Persistency”, in ISCA-2014. December 9, 2015 MICRO-48 9
Epoch Persistence* St a St b St c St a Epoch 1 Epoch 2 Epoch 3 Persist Barrier a b c a d e d p q d Visibility St d St e b a c d e Persistence St d Persist Barrier St p St q St d … * Pelley et. al., “Memory Persistency”, in ISCA-2014. December 9, 2015 MICRO-48 9
Epoch Persistence* St a St b St c St a Epoch 1 Epoch 2 Epoch 3 Persist Barrier a b c a d e d p q d Visibility St d St e b a c d e Persistence St d Persist Barrier St p St q St d … * Pelley et. al., “Memory Persistency”, in ISCA-2014. December 9, 2015 MICRO-48 9
Epoch Persistence* St a St b St c St a Epoch 1 Epoch 2 Epoch 3 Persist Barrier a b c a d e d p q d Visibility St d St e b a c d e Persistence St d Persist Barrier St p St q St d … * Pelley et. al., “Memory Persistency”, in ISCA-2014. December 9, 2015 MICRO-48 9
Epoch Persistence* St a St b St c St a Epoch 1 Epoch 2 Epoch 3 Persist Barrier a b c a d e d p q d Visibility St d St e b a c d e Persistence St d Persist Barrier St p St q St d … * Pelley et. al., “Memory Persistency”, in ISCA-2014. December 9, 2015 MICRO-48 9
Epoch Persistence* St a St b St c St a Epoch 1 Epoch 2 Epoch 3 Persist Barrier a b c a d e d p q d Visibility St d St e b a c d e Persistence St d Persist Barrier St p St q St d … Persist operations happen in the critical path of execution. * Pelley et. al., “Memory Persistency”, in ISCA-2014. December 9, 2015 MICRO-48 9
Buffered Epoch Persistence* through Lazy Barrier (LB) • Implementation of Epoch Persistence • Durability lags visibility • To allow performing persist operations out of critical path * Pelley et. al., “Memory Persistency”, in ISCA-2014. * Condit et. al., “Better I/O through byte-addressable, persistent memory”, in SOSP-2009. December 9, 2015 MICRO-48 10
Buffered Epoch Persistence* through Lazy Barrier (LB) Epoch 1 Epoch 2 Epoch 3 Visibility a b c a d e d p q d − Conflicting request a b c d e Persistence * Pelley et. al., “Memory Persistency”, in ISCA-2014. * Condit et. al., “Better I/O through byte-addressable, persistent memory”, in SOSP-2009. December 9, 2015 MICRO-48 11
Buffered Epoch Persistence* through Lazy Barrier (LB) Epoch 1 Epoch 2 Epoch 3 Visibility a b c a d e d p q d − Conflicting request a b c d e Persistence * Pelley et. al., “Memory Persistency”, in ISCA-2014. * Condit et. al., “Better I/O through byte-addressable, persistent memory”, in SOSP-2009. December 9, 2015 MICRO-48 11
Buffered Epoch Persistence* through Lazy Barrier (LB) Epoch 1 Epoch 2 Epoch 3 Visibility a b c a d e d p q d − Conflicting request a b c d e Persistence * Pelley et. al., “Memory Persistency”, in ISCA-2014. * Condit et. al., “Better I/O through byte-addressable, persistent memory”, in SOSP-2009. December 9, 2015 MICRO-48 11
Buffered Epoch Persistence* through Lazy Barrier (LB) Epoch 1 Epoch 2 Epoch 3 Visibility a b c a d e d p q d − Conflicting request a b c d e Persistence Cache Line Eviction * Pelley et. al., “Memory Persistency”, in ISCA-2014. * Condit et. al., “Better I/O through byte-addressable, persistent memory”, in SOSP-2009. December 9, 2015 MICRO-48 11
Buffered Epoch Persistence* through Lazy Barrier (LB) Epoch 1 Epoch 2 Epoch 3 Visibility a b c a d e d p q d − Conflicting request a b c d e Persistence * Pelley et. al., “Memory Persistency”, in ISCA-2014. * Condit et. al., “Better I/O through byte-addressable, persistent memory”, in SOSP-2009. December 9, 2015 MICRO-48 11
Buffered Epoch Persistence* through Lazy Barrier (LB) Epoch 1 Epoch 2 Epoch 3 Visibility a b c a d e d p q d − Conflicting request a b c d e Persistence * Pelley et. al., “Memory Persistency”, in ISCA-2014. Conflicts bring persist operations back in the critical path. * Condit et. al., “Better I/O through byte-addressable, persistent memory”, in SOSP-2009. December 9, 2015 MICRO-48 11
Intra-thread Conflict Epoch 1 Epoch 2 Epoch 3 Visibility a b c a d e d p q d − Conflicting request a b c d e Persistence December 9, 2015 MICRO-48 12
Intra-thread Conflict Epoch 1 Epoch 2 Epoch 3 Visibility a b c a d e d p q d − Conflicting request a b c d e Persistence December 9, 2015 MICRO-48 12
Recommend
More recommend