architectural support for atomic durability in non
play

Architectural Support for Atomic Durability in Non-Volatile Memory - PowerPoint PPT Presentation

Architectural Support for Atomic Durability in Non-Volatile Memory Arpit Joshi , Vijay Nagarajan, Stratis Viglas, Marcelo Cintra NVMW 2018 Summary Non-Volatile Memory (NVM) - on the memory bus enables in-memory persistent data structures


  1. Architectural Support for Atomic Durability in Non-Volatile Memory Arpit Joshi , Vijay Nagarajan, Stratis Viglas, Marcelo Cintra NVMW 2018

  2. Summary • Non-Volatile Memory (NVM) - on the memory bus • enables in-memory persistent data structures • Persistent data structures require an atomic durability primitive to ensure crash consistency • Logging is a technique to provide atomic durability • ATOM: hardware support for atomic durability by way of undo logging 2

  3. Atomic Durability • All or nothing persists: think transactions ( A CI D ) 3

  4. Atomic Durability • All or nothing persists: think transactions ( A CI D ) Initial State A 100 B 100 3

  5. Atomic Durability • All or nothing persists: think transactions ( A CI D ) Initial State A 100 B 100 Atomic_Begin A = A - 50 B = B + 50 Atomic_End 3

  6. Atomic Durability • All or nothing persists: think transactions ( A CI D ) Final State Initial State A 100 B 100 A 100 B 100 Atomic_Begin A = A - 50 B = B + 50 Atomic_End 3

  7. Atomic Durability • All or nothing persists: think transactions ( A CI D ) Final State Initial State A 100 B 100 A 100 B 100 Final State A 50 B 150 Atomic_Begin A = A - 50 B = B + 50 Atomic_End 3

  8. Atomic Durability • All or nothing persists: think transactions ( A CI D ) Final State Initial State A 100 B 100 A 100 B 100 Final State A 50 B 150 Atomic_Begin A = A - 50 Final State Final State B = B + 50 Atomic_End A 50 B 100 A 100 B 150 3

  9. Atomic Durability • All or nothing persists: think transactions ( A CI D ) Final State Initial State A 100 B 100 A 100 B 100 Final State A 50 B 150 Atomic_Begin A = A - 50 Final State Final State B = B + 50 Atomic_End A 50 B 100 A 100 B 150 3

  10. Mechanisms Shadow Paging Write-Ahead-Logging ➡ beneficial for coarse grained updates 4

  11. Mechanisms Shadow Paging Write-Ahead-Logging ➡ beneficial for coarse grained updates REDO UNDO ➡ reads redirection ➡ fine grained log->data ordering ➡ victim cache 4

  12. Undo Logging 1. Compute : Compute the new value (V = A - 50) 2. Log : Write old value of data to log space in persistent memory (Log [A , 100]) 3. Modify : Modify data in-place (A = V) NVM Data Log A 100 5

  13. Undo Logging 1. Compute : Compute the new value (V = A - 50) 2. Log : Write old value of data to log space in persistent memory (Log [A , 100]) 3. Modify : Modify data in-place (A = V) NVM Data Log A 100 A 100 5

  14. Undo Logging 1. Compute : Compute the new value (V = A - 50) 2. Log : Write old value of data to log space in persistent memory (Log [A , 100]) 3. Modify : Modify data in-place (A = V) NVM Data Log A 100 50 A 100 5

  15. Undo Logging 1. Compute : Compute the new value (V = A - 50) 2. Log : Write old value of data to log space in persistent memory (Log [A , 100]) 3. Modify : Modify data in-place (A = V) NVM Data Log A 100 50 A 100 Log writes reach NVM before data writes. (Log —> Data ordering) 5

  16. Undo Logging 1. Compute : Compute the new value (V = A - 50) 2. Log : Write old value of data to log space in persistent memory (Log [A , 100]) 3. Modify : Modify data in-place (A = V) NVM Data Log A 100 50 A 100 Logging is essentially a data movement task. 5

  17. System Architecture Core Core Cache Cache DRAM NVM Secondary Storage Secondary Storage Disk Based Persistence NVM Based Persistence 6

  18. System Architecture Core Core Cache Cache DRAM NVM Software Controlled Secondary Storage Secondary Storage Disk Based Persistence NVM Based Persistence 6

  19. System Architecture Core Core Cache Cache Hardware Controlled DRAM NVM Software Controlled Secondary Storage Secondary Storage Disk Based Persistence NVM Based Persistence 6

  20. Logging with Disk Compute Log Modify Flush Log Flush Data 7

  21. Logging with Disk Volatile Phase Persistence Phase Compute Log Modify Flush Log Flush Data 7

  22. Logging with Disk Volatile Phase Persistence Phase Compute Log Modify Flush Log Flush Data Clear separation of volatile and persistence phases. 7

  23. Logging with NVM Compute Log Flush Log Modify Flush Data 8

  24. Logging with NVM Compute Log Flush Log Modify Flush Data Volatile and persistence phases overlap. 8

  25. ATOM Compute Modify Flush Data Log Flush Log In Hardware 9

  26. ATOM Compute Modify Flush Data Log Flush Log In Hardware Goal: Move logging out of critical path. 9

  27. Programming Model while ( ! Done ) { ATOMIC_BEGIN Write Undo Log while ( ! Done ) { Flush Log Modify Data Modify Data } } Flush Data Flush Data ATOMIC_END Software Logging ATOM 10

  28. Baseline Hardware Logging Core • Create Undo Log • on a store, write old Cache value to log A 100 • Flush Undo Log • enforce log —> data ordering NVM Data Log A 100 11

  29. Baseline Hardware Logging A = 50 Core • Create Undo Log • on a store, write old Cache value to log A 100 • Flush Undo Log • enforce log —> data ordering NVM Data Log A 100 11

  30. Baseline Hardware Logging A = 50 Core • Create Undo Log • on a store, write old Cache value to log L(A) = 100 A 100 • Flush Undo Log • enforce log —> data ordering NVM Data Log A 100 A 100 11

  31. Baseline Hardware Logging A = 50 Core • Create Undo Log • on a store, write old Log Cache value to log Done L(A) = 100 A 100 50 • Flush Undo Log • enforce log —> data ordering NVM Data Log A 100 A 100 11

  32. ATOM Design Philosophy Where is log —> data ordering enforced? Core Store Queue Cache Memory Controller Store Buffer NVM 12

  33. ATOM Design Philosophy Where is log —> data ordering enforced? Core Store Queue Baseline Design Cache Memory Controller Store Buffer NVM 12

  34. ATOM Design Philosophy Where is log —> data ordering enforced? Core Store Queue Baseline Design Cache Memory Controller Store Buffer ATOM Design NVM 12

  35. Baseline Implementation SQ Cache Mem Ctrl Memory 13

  36. Baseline Implementation SQ ST(A) Cache Mem Ctrl Memory 13

  37. Baseline Implementation SQ ST(A) Cache L(A) Mem Ctrl Memory 13

  38. Baseline Implementation SQ ST(A) Cache L(A) Mem Ctrl L(A) Memory 13

  39. Baseline Implementation SQ ST(A) Cache L(A) Mem Ctrl L(A) Memory WRITE L(A) 13

  40. Baseline Implementation SQ ST(A) Cache L(A) Mem Ctrl L(A) L(A) Memory WRITE L(A) 13

  41. Baseline Implementation SQ ST(A) Cache L(A) L(A) Mem Ctrl L(A) L(A) Memory WRITE L(A) 13

  42. Baseline Implementation SQ ST(A) ST(A) Cache L(A) L(A) Mem Ctrl L(A) L(A) Memory WRITE L(A) 13

  43. Baseline Implementation Store Completion Time SQ ST(A) ST(A) Cache L(A) L(A) Mem Ctrl L(A) L(A) Memory WRITE L(A) 13

  44. Baseline Implementation Store Completion Time SQ ST(A) ST(A) Cache L(A) L(A) Mem Ctrl L(A) L(A) Memory WRITE L(A) Log persist operation in the critical path of retiring stores. 13

  45. ATOM Posted Log SQ Cache Mem Ctrl Memory 14

  46. ATOM Posted Log SQ ST(A) Cache Mem Ctrl Memory 14

  47. ATOM Posted Log SQ ST(A) Cache L(A) Mem Ctrl Memory 14

  48. ATOM Posted Log SQ ST(A) Cache L(A) Mem Ctrl L(A) Memory 14

  49. ATOM Posted Log SQ ST(A) Cache L(A) Mem Ctrl L(A) Memory WRITE L(A) 14

  50. ATOM Posted Log SQ ST(A) Cache L(A) Mem Ctrl L(A) L(A) Memory WRITE L(A) 14

  51. ATOM Posted Log SQ ST(A) Cache L(A) L(A) Mem Ctrl L(A) L(A) Memory WRITE L(A) 14

  52. ATOM Posted Log SQ ST(A) ST(A) Cache L(A) L(A) Mem Ctrl L(A) L(A) Memory WRITE L(A) 14

  53. ATOM Posted Log Store Completion Time SQ ST(A) ST(A) Cache L(A) L(A) Mem Ctrl L(A) L(A) Memory WRITE L(A) 14

  54. ATOM Posted Log Store Completion Time SQ ST(A) ST(A) Cache L(A) L(A) Mem Ctrl L(A) L(A) Memory WRITE L(A) Remove log persist operations from the critical path by enforcing ordering at memory controller. 14

  55. ATOM Store Miss SQ Cache Mem Ctrl Memory 15

  56. ATOM Store Miss SQ Cache Mem Ctrl Memory RD (A) 15

  57. ATOM Store Miss SQ Cache Mem Ctrl RD(A) Memory RD (A) 15

  58. ATOM Store Miss SQ Cache RD(A) Mem Ctrl RD(A) Memory RD (A) 15

  59. ATOM Store Miss SQ Cache RD(A) L(A) Mem Ctrl RD(A) Memory RD (A) 15

  60. ATOM Store Miss SQ Cache RD(A) L(A) Mem Ctrl L(A) RD(A) Memory RD (A) 15

  61. ATOM Store Miss SQ Cache RD(A) L(A) Mem Ctrl L(A) RD(A) Memory WRITE L(A) RD (A) 15

  62. ATOM Store Miss SQ Cache RD(A) L(A) Mem Ctrl L(A) L(A) RD(A) Memory WRITE L(A) RD (A) 15

  63. ATOM Store Miss SQ Cache RD(A) L(A) L(A) Mem Ctrl L(A) L(A) RD(A) Memory WRITE L(A) RD (A) 15

  64. ATOM Store Miss SQ ST(A) Cache RD(A) L(A) L(A) Mem Ctrl L(A) L(A) RD(A) Memory WRITE L(A) RD (A) 15

  65. ATOM Store Miss Store Completion Time SQ ST(A) Cache RD(A) L(A) L(A) Mem Ctrl L(A) L(A) RD(A) Memory WRITE L(A) RD (A) 15

Recommend


More recommend