Makalu: fast recoverable allocation of non-volatile memory
2016, ACM SIGPLAN Notices
https://doi.org/10.1145/3022671.2984019Abstract
Byte addressable non-volatile memory (NVRAM) is likely to supplement, and perhaps eventually replace, DRAM. Applications can then persist data structures directly in memory instead of serializing them and storing them onto a durable block device. However, failures during execution can leave data structures in NVRAM unreachable or corrupt. In this paper, we present Makalu, a system that addresses non-volatile memory management. Makalu offers an integrated allocator and recovery-time garbage collector that maintains internal consistency, avoids NVRAM memory leaks, and is efficient, all in the face of failures. We show that a careful allocator design can support a less restrictive and a much more familiar programming model than existing persistent memory allocators. Our allocator significantly reduces the per allocation persistence overhead by lazily persisting non-essential metadata and by employing a post-failure recovery-time garbage collector. Experimental results show that the res...
References (52)
- hdr* cHdr = map.find(b);
- hdr* pHdr = map.find(b-1);
- hdr* nHdr = map.find(b+1);
- /* coalesce with previous block */ 10: if (pHdr && isFree(pHdr)) { 11: removeFromChunkFL(pHdr -> hb_block);
- /* ACID update, core metadata */ 13: store_nvm_word(&pHdr -> hb_sz, 14: pHdr -> hb_sz + BLOCK_SZ);
- uninstall(cHdr); 18: cHdr = pHdr; 19: coalesced = 1; 20: } 21: /* coalesce with next block */ 22: if (nHdr && isFree(nHdr)){ 23: removeFromChunkFL(nHdr->hb_block);
- store_nvm_addr(&nHdr->hb_block, NULL) 28: uninstall(nHdr); 29: coalesced = 1; 30: } 31: /* update the current hdr */ 32: if (!coalesced){ 33: store_nvm_word(&cHdr->hb_sz, BLOCK_SZ);
- store_nvm_int(&cHdr->hb_flag, FREE); 35: } 36: end_nvm_atomic();
- 1: start_nvm_atomic(){ 2: next = md_log_space_start;
- FLUSH(md_log_version);
- 8: store_nvm_int(int* addr, int val){ 9: /* create a log entry */ 10: next->addr = addr; 11: next->val.int_val = *addr; 12: next->type = INT;
- MEMORY_FENCE();
- 24: store_nvm_word(int* addr,int val);
- References
- NVDIMM special interest group. URL http://www.snia. org/forums/sssi/NVDIMM.
- Pmem.io: Persistent memory programming. URL http:// pmem.io/.
- NVM programming technical work group. URL http:// www.snia.org/forums/sssi/nvmp.
- Process integration, devices and structures. International Technology Roadmap for Semiconductors (ITRS), 2013. URL http://www.semiconductors.org/clientuploads/ Research_Technology/ITRS/2013/2013PIDS.pdf.
- NVM direct library, 2015. URL http:// www.oracle.com/technetwork/oracle-labs/ open-nvm-download-2440119.html.
- M. Aigner, C. Kirsch, M. Lippautz, and A. Sokolova. Fast, multicore-scalable, low-fragmentation memory alloca- tion through large virtual memory and global data structures. In Proceedings of the 2015 ACM International Conference on Object Oriented Programming Systems Languages and Appli- cations, OOPSLA '15, New York, NY, USA, 2015. ACM.
- M. P. Atkinson, P. J. Bailey, K. J. Chisholm, P. W. Cockshott, and R. Morrison. Readings in object-oriented database sys- tems. chapter An Approach to Persistent Programming, pages 141-146. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1990. ISBN 0-55860-000-0.
- J. Barnes and P. Hut. A hierarchical O(N log N) force- calculation algorithm. Nature, 324(6096):446-449, Dec. 1986.
- E. D. Berger, K. S. McKinley, R. D. Blumofe, and P. R. Wil- son. Hoard: A scalable memory allocator for multithreaded applications. In Proceedings of the Ninth International Con- ference on Architectural Support for Programming Languages and Operating Systems, ASPLOS IX, pages 117-128, New York, NY, USA, 2000. ACM.
- B. Bernhardsson. Explicit solutions to the n-queens problem for all n. SIGART Bull., 2(2):7-, Feb. 1991. ISSN 0163-5719.
- H.-J. Boehm. A garbage collector for c and c++. URL http://www.hboehm.info/gc/gcdescr.html.
- H.-J. Boehm. Fast multiprocessor memory allocation and garbage collection. Technical Report HPL-2000-165, Inter- net and Mobile Systems Laboratory, HP Laboratories, Palo Alto, CA, December 2000. URL http://www.hpl.hp.com/ techreports/2000/HPL-2000-165.html.
- H.-J. Boehm and M. Weiser. Garbage collection in an unco- operative environment. Softw. Pract. Exper., 18(9):807-820, September 1988.
- D. R. Chakrabarti, H.-J. Boehm, and K. Bhandari. Atlas: Leveraging locks for non-volatile memory consistency. In Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages and Appli- cations, OOPSLA '14, pages 433-452, New York, NY, USA, 2014. ACM.
- J. Coburn, A. M. Caulfield, A. Akel, L. M. Grupp, R. K. Gupta, R. Jhala, and S. Swanson. Nv-heaps: Making persis- tent objects fast and safe with next-generation, non-volatile memories. In Proceedings of the Sixteenth International Con- ference on Architectural Support for Programming Languages and Operating Systems, ASPLOS XVI, pages 105-118, New York, NY, USA, 2011. ACM.
- A. Dearle, G. N. C. Kirby, and R. Morrison. Orthogonal persistence revisited. In Proceedings of the Second Interna- tional Conference on Object Databases, ICOODB'09, pages 1-22, Berlin, Heidelberg, 2010. Springer-Verlag. ISBN 3- 642-14680-5, 978-3-642-14680-0.
- T. Endo and K. Taura. Reducing pause time of conservative collectors. In Proceedings of the 3rd International Symposium on Memory Management, ISMM '02, pages 119-131, New York, NY, USA, 2002. ACM. ISBN 1-58113-539-4.
- J. Evans. Jemalloc: A scalable concurrent malloc(3) imple- mentation, 2006. URL https://github.com/jemalloc/ jemalloc.
- T. Gao, K. Strauss, S. M. Blackburn, K. S. McKinley, D. Burger, and J. Larus. Using managed runtime systems to tolerate holes in wearable memories. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '13, pages 297-308, New York, NY, USA, 2013. ACM.
- J. E. Gentle. Matrix Algebra: Theory, Computations, and Applications in Statistics. Springer Publishing Com- pany, Incorporated, 1st edition, 2007. ISBN 0387708723, 9780387708720.
- W. Gloger. ptmalloc3: Multi-threaded extension to dlmalloc, 2006. URL http://malloc.de/en/.
- A. L. Hosking and J. Chen. Mostly-copying reachability- based orthogonal persistence. In Proceedings of the 14th ACM SIGPLAN Conference on Object-oriented Programming, Sys- tems, Languages, and Applications, OOPSLA '99, pages 382- 398, New York, NY, USA, 1999. ACM. ISBN 1-58113-238-7.
- R. L. Hudson, B. Saha, A.-R. Adl-Tabatabai, and B. C. Hertzberg. Mcrt-malloc: A scalable transactional memory al- locator. In Proceedings of the 5th International Symposium on Memory Management, ISMM '06, pages 74-83, New York, NY, USA, 2006. ACM. ISBN 1-59593-221-6.
- Intel Corp. Intel Architecture Instruction Set Ex- tensions Programming Reference, . URL https: //software.intel.com/sites/default/files/ managed/b4/3a/319433-024.pdf.
- Intel Corp. Intel64 and IA-32 Architectures Soft- ware Developers Manuals Combined, . URL http: //www.intel.com/content/www/us/en/processors/ architectures-software-developer-manuals.html.
- B. C. Kuszmaul. Supermalloc: A super fast multithreaded malloc for 64-bit machines. In Proceedings of the 2015 ACM SIGPLAN International Symposium on Memory Management, ISMM 2015, pages 41-55, New York, NY, USA, 2015. ACM.
- P.-A. Larson and M. Krishnan. Memory allocation for long- running server applications. In Proceedings of the 1st Interna- tional Symposium on Memory Management, ISMM '98, pages 176-185, New York, NY, USA, 1998. ACM.
- B. C. Lee, E. Ipek, O. Mutlu, and D. Burger. Architecting phase change memory as a scalable dram alternative. In Proceedings of the 36th Annual International Symposium on Computer Architecture, ISCA '09, pages 2-13, New York, NY, USA, 2009. ACM.
- K. Lim, J. Chang, T. Mudge, P. Ranganathan, S. K. Reinhardt, and T. F. Wenisch. Disaggregated memory for expansion and sharing in blade servers. In Proceedings of the 36th Annual International Symposium on Computer Architecture, ISCA '09, pages 267-278, New York, NY, USA, 2009. ACM.
- C. Mellor. SanDisk, HP take on Micron and In- tels faster-than-flash XPoint. The Register, October 2015. URL http://www.theregister.co.uk/2015/10/ 12/sandisk_and_hp_partner_to_counter_xpoint/.
- M. M. Michael and M. L. Scott. Simple, fast, and practi- cal non-blocking and blocking concurrent queue algorithms. In Proceedings of the Fifteenth Annual ACM Symposium on Principles of Distributed Computing, PODC '96, pages 267- 275, New York, NY, USA, 1996. ACM.
- Micron. 3D XPoint Technology. URL https: //www.micron.com/about/emerging-technologies/ 3d-xpoint-technology.
- M. K. Qureshi, V. Srinivasan, and J. A. Rivers. Scalable high performance main memory system using phase-change mem- ory technology. In Proceedings of the 36th Annual Interna- tional Symposium on Computer Architecture, ISCA '09, pages 24-33, New York, NY, USA, 2009. ACM.
- G. Rodriguez-Rivera, M. Spertus, and C. Fiterman. Conserva- tive garbage collectors for general memory allocators. ISMM '00, pages 71-79, New York, NY, USA, 2000. ACM.
- D. Schwalb, T. Berning, M. Faust, M. Dreseler, and H. Plat- tner. nvm malloc: Memory allocation for nvram. In Accelerat- ing Data Management Systems Using Modern Processor and Storage Architectures Workshop, In conjunction with VLDB, 2015.
- P. Snyder. tmpfs: A virtual memory file system. In In Pro- ceedings of the Autumn 1990 European UNIX Users Group Conference, pages 241-248, 1990.
- D. B. Strukov, G. S. Snider, D. R. Stewart, and R. S. Williams. The missing memristor found. Nature, 453(7191):80-83, May 2008.
- H. Volos, A. J. Tack, and M. M. Swift. Mnemosyne: Lightweight persistent memory. In Proceedings of the Six- teenth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS XVI, pages 91-104, New York, NY, USA, 2011. ACM.