Hardware Supported Permission Checks On Persistent Objects for Performance and Programmability Tiancong Wang, Sakthikumaran Sambasivam, James Tuck twang14@ncsu.edu or jtuck@ncsu.edu �1
NVM Programming �2
NVM Programming • Non-Volatile Memory is attractive • Byte addressable persistent storage NVMM �2
NVM Programming • Non-Volatile Memory is attractive • Byte addressable persistent storage NVMM • Direct access (DAX) �2
NVM Programming • Non-Volatile Memory is attractive • Byte addressable persistent storage NVMM • Direct access (DAX) Pool 1 • Treat NVM as many persistent Pool 2 regions, a.k.a. pools �2
NVM Programming Address Space • Non-Volatile Memory is attractive stack • Byte addressable persistent storage NVMM • Direct access (DAX) Pool 1 • Treat NVM as many persistent Pool 2 regions, a.k.a. pools • Pools are mapped to address space to create persistent data structure heap BSS data text �2
NVM Programming Address Space • Non-Volatile Memory is attractive stack • Byte addressable persistent storage NVMM • Direct access (DAX) Pool 1 • Treat NVM as many persistent Pool 2 regions, a.k.a. pools • Pools are mapped to address space to create persistent data structure • Use permanent pointers for creating heap linked data structures BSS data text �2
NVM Programming Address Space • Non-Volatile Memory is attractive stack • Byte addressable persistent storage NVMM • Direct access (DAX) Pool 1 • Treat NVM as many persistent Pool 2 regions, a.k.a. pools • Pools are mapped to address space to create persistent data structure • Use permanent pointers for creating heap linked data structures BSS • A permanent pointer can point to an data object within the pool, or across text pools �2
Problem Program 1 Address Space stack NVMM Pool 1 Pool 2 heap BSS data text �3
Program 1 Address Space stack Problem Program 2 Address Space heap • Another program wants to access BSS stack data text the same data structure NVMM Pool 1 Pool 2 heap BSS data text �3
Program 1 Address Space stack Problem Program 2 Address Space heap • Another program wants to access BSS stack data text the same data structure NVMM ★ Is the permanent pointer still valid? Pool 1 Pool 2 ? heap BSS data text �3
Program 1 Address Space stack Problem Program 2 Address Space heap • Another program wants to access BSS stack data text the same data structure NVMM ★ Is the permanent pointer still valid? Pool 1 • Need to map the pools before Pool 2 accessing it. ? heap BSS data text �3
Program 1 Address Space stack Problem Program 2 Address Space heap • Another program wants to access BSS stack data text the same data structure NVMM ★ Is the permanent pointer still valid? Pool 1 • Need to map the pools before Pool 2 accessing it. ? • Not all the programs have same permissions; need to check the permission before mapping heap BSS data text �3
Program 1 Address Space stack Problem Program 2 Address Space heap • Another program wants to access BSS stack data text the same data structure NVMM ★ Is the permanent pointer still valid? Pool 1 • Need to map the pools before Pool 2 accessing it. ? • Not all the programs have same permissions; need to check the permission before mapping heap ★ We need to validate on ALL BSS permanent pointers before data dereferencing, to make sure the text pool is checked and mapped �3
Program 1 Address Space stack Problem Program 2 Address Space heap • Another program wants to access BSS stack data text the same data structure NVMM ★ Is the permanent pointer still valid? Pool 1 • Need to map the pools before Pool 2 accessing it. ? • Not all the programs have same permissions; need to check the permission before mapping heap ★ We need to validate on ALL BSS permanent pointers before Performance overhead data dereferencing, to make sure the text Programming burden pool is checked and mapped �3
Solution • System Persistent Object Table System Persistent Object Table (SPOT) (SPOT) • Similar to page table, BUT is a system table. • Permission check: stores Pool ID Physical addr. Permission info permission information • Mapping: stores mapping of physical addresses • Programmers no longer need to reason about permanent pointers as long as the program has permissions
Contributions �5
Contributions • Point out permanent pointers can point to unmapped regions; reasoning about them is a new programming burden �5
Contributions • Point out permanent pointers can point to unmapped regions; reasoning about them is a new programming burden • Hardware can efficiently check permission and map pools when dereferencing any permanent address. �5
Contributions • Point out permanent pointers can point to unmapped regions; reasoning about them is a new programming burden • Hardware can efficiently check permission and map pools when dereferencing any permanent address. • We study and compare different design choices that provide permission checks in hardware and software �5
Contributions • Point out permanent pointers can point to unmapped regions; reasoning about them is a new programming burden • Hardware can efficiently check permission and map pools when dereferencing any permanent address. • We study and compare different design choices that provide permission checks in hardware and software • Evaluate on 6 microbenchmarks and 2 applications �5
Contributions • Point out permanent pointers can point to unmapped regions; reasoning about them is a new programming burden • Hardware can efficiently check permission and map pools when dereferencing any permanent address. • We study and compare different design choices that provide permission checks in hardware and software • Evaluate on 6 microbenchmarks and 2 applications • Our design offers a 2.9x speedup on average for micro- benchmarks and 1.4x and 1.8x speedup on TPC-C and Vacation �5
Outline • Introduction • Motivation - More details of permission check and pool mapping • Implementation - Hardware supported permission check (SPOT) • Result - Performance on out-of-order processors • Summary �6
MOTIVATION • Permanent address: ObjectID • Where’s programming burden and performance overhead • Idea of automatic permission check �7
Motivation - ObjectIDs
Motivation - ObjectIDs • Permanent address : ObjectID, (Pool ID, offset)
Motivation - ObjectIDs • Permanent address : Pool ID Offset Object ID ObjectID, (Pool ID, offset) • Translation : Address = Pool ID Base address BaseAddressLookup(Pool #) 1234 0xDEADBEEF + offset 5678 0x12345678 … …
Motivation - ObjectIDs • Permanent address : Pool ID Offset Object ID 5678 ObjectID, (Pool ID, offset) Hash Table search • Translation : Address = Pool ID Base address BaseAddressLookup(Pool #) 1234 0xDEADBEEF + offset 5678 0x12345678 + … … Translated address
Motivation - ObjectIDs • Permanent address : Pool ID Offset Object ID 5678 ObjectID, (Pool ID, offset) Hash Table search • Translation : Address = Pool ID Base address BaseAddressLookup(Pool #) 1234 0xDEADBEEF + offset • Translation can be optimized 5678 0x12345678 + through either hardware or … … software support in prior works Translated address
Motivation - Programming burden Address Space stack Pool 1 Pool 2 heap BSS data text
Motivation - Programming burden Address Space oid1 = head (1, 10) stack Pool 1 Pool 2 heap BSS data text
Motivation - Programming burden Address Space oid1 = head stack check oid1 (1, 10) Check&Map Pool 1 Pool 1 Pool 2 heap BSS data text
Motivation - Programming burden Address Space oid1 = head stack check oid1 addr1 = translate oid1 (1, 10) Pool 1 Pool 2 heap BSS data text
Motivation - Programming burden Address Space oid1 = head stack check oid1 addr1 = translate oid1 Pool 1 (1, 20) oid2 = load from addr1 Pool 2 heap BSS data text
Motivation - Programming burden Address Space oid1 = head stack check oid1 addr1 = translate oid1 Pool 1 oid2 = load from addr1 check oid2 (1, 20) Pool 2 heap BSS data text
Motivation - Programming burden Address Space oid1 = head stack check oid1 addr1 = translate oid1 Pool 1 oid2 = load from addr1 check oid2 addr2 = translate oid2 (1, 20) Pool 2 heap BSS data text
Motivation - Programming burden Address Space oid1 = head stack check oid1 addr1 = translate oid1 Pool 1 oid2 = load from addr1 check oid2 addr2 = translate oid2 Pool 2 (2, 20) oid3 = load from addr2 heap BSS data text
Motivation - Programming burden Address Space oid1 = head stack check oid1 addr1 = translate oid1 Pool 1 oid2 = load from addr1 check oid2 addr2 = translate oid2 Pool 2 oid3 = load from addr2 check oid3 (2, 20) Check&Map Pool 2 heap BSS data text
Recommend
More recommend