Building NVRAM-Aware Swapping Through Code Migration in Mobile Devices

Mobile applications are becoming increasingly feature-rich and powerful, but also dependent on large main memories, which consume a large portion of system energy, especially for devices equipped with 4/6 GB DRAM. Swapping inactive DRAM pages to byte-addressable, non-volatile memory (NVRAM) is a promising solution to this problem. However, most NVRAMs have limited write endurance and the current victim pages selecting algorithm does not aware it. Therefore, to make it practical, the design of an NVRAM based swapping system must also consider endurance. In this paper, we target at prolonging the lifetime of NVRAM based swap area in mobile devices by reducing the write activities to NVRAM based swap area. Different from traditional wisdom, such as wear leveling and hot/cold data identification, we propose to build a system called nCode, which exploits the fact that code pages are easy to identify, read-only, and therefore a perfect candidate for swapping. Utilizing NVRAM’s byte-addressability, we support execute-in-place (XIP) of the code pages in the swap area, without copying them back to DRAM based main memory. Experimental results based on the Google Nexus 5 smartphone show that nCode can effectively prolong the lifetime of NVRAM under various workloads.

[1]  Tao Li,et al.  Characterizing and mitigating the impact of process variations on phase change based memory systems , 2009, 2009 42nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[2]  Vijayalakshmi Srinivasan,et al.  Scalable high performance main memory system using phase-change memory technology , 2009, ISCA '09.

[3]  Cristian Ungureanu,et al.  Revisiting storage for smartphones , 2012, TOS.

[4]  Sean Eilert,et al.  Phase Change Memory: A New Memory Enables New Memory Usage Models , 2009, 2009 IEEE International Memory Workshop.

[5]  Tao Li,et al.  Exploring Phase Change Memory and 3D Die-Stacking for Power/Thermal Friendly, Fast and Durable Memory Architectures , 2009, 2009 18th International Conference on Parallel Architectures and Compilation Techniques.

[6]  Jun Yang,et al.  A durable and energy efficient main memory using phase change memory technology , 2009, ISCA '09.

[7]  Huazhong Yang,et al.  A compression-based area-efficient recovery architecture for nonvolatile processors , 2012, 2012 Design, Automation & Test in Europe Conference & Exhibition (DATE).

[8]  Edwin Hsing-Mean Sha,et al.  nCode: Limiting harmful writes to emerging mobile NVRAM through code swapping , 2015, 2015 Design, Automation & Test in Europe Conference & Exhibition (DATE).

[9]  HuJingtong,et al.  Write activity reduction on non-volatile main memories for embedded chip multiprocessors , 2013 .

[10]  Seung-Yun Lee,et al.  A Low Power Phase-Change Random Access Memory using a Data-Comparison Write Scheme , 2007, 2007 IEEE International Symposium on Circuits and Systems.

[11]  Xin Fu,et al.  Characterizing, modeling, and improving the QoE of mobile devices with low battery level , 2015, 2015 48th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[12]  Tei-Wei Kuo,et al.  Age-based PCM wear leveling with nearly zero search cost , 2012, DAC Design Automation Conference 2012.

[13]  H.-S. Philip Wong,et al.  Phase Change Memory , 2010, Proceedings of the IEEE.

[14]  Edwin Hsing-Mean Sha,et al.  DR. Swap: Energy-efficient paging for smartphones , 2014, 2014 IEEE/ACM International Symposium on Low Power Electronics and Design (ISLPED).

[15]  Vivek S. Pai,et al.  SSDAlloc: Hybrid SSD/RAM Memory Management Made Easy , 2011, NSDI.

[16]  Rami G. Melhem,et al.  Increasing PCM main memory lifetime , 2010, 2010 Design, Automation & Test in Europe Conference & Exhibition (DATE 2010).

[17]  Qingfeng Zhuge,et al.  Application-Specific Wear Leveling for Extending Lifetime of Phase Change Memory in Embedded Systems , 2014, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems.

[18]  Onur Mutlu,et al.  Architecting phase change memory as a scalable dram alternative , 2009, ISCA '09.

[19]  Edwin Hsing-Mean Sha,et al.  Curling-PCM: Application-specific wear leveling for phase change memory based embedded systems , 2013, 2013 18th Asia and South Pacific Design Automation Conference (ASP-DAC).

[20]  Seon-Yeong Park,et al.  FASS : A Flash-Aware Swap System , 2005 .

[21]  M. Hosomi,et al.  A novel nonvolatile memory with spin torque transfer magnetization switching: spin-ram , 2005, IEEE InternationalElectron Devices Meeting, 2005. IEDM Technical Digest..

[22]  Meikang Qiu,et al.  SwapBench: The Easy Way to Demystify Swapping in Mobile Systems , 2015, 2015 IEEE 17th International Conference on High Performance Computing and Communications, 2015 IEEE 7th International Symposium on Cyberspace Safety and Security, and 2015 IEEE 12th International Conference on Embedded Software and Systems.

[23]  Wei-Che Tseng,et al.  Write activity reduction on non-volatile main memories for embedded chip multiprocessors , 2013, TECS.

[24]  Edwin Hsing-Mean Sha,et al.  The design of an efficient swap mechanism for hybrid DRAM-NVM systems , 2016, 2016 International Conference on Embedded Software (EMSOFT).

[25]  Hyunjin Lee,et al.  Flip-N-Write: A simple deterministic technique to improve PRAM write performance, energy and endurance , 2009, 2009 42nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[26]  Yuan Xue,et al.  Prolonging PCM lifetime through energy-efficient, segment-aware, and wear-resistant page allocation , 2014, 2014 IEEE/ACM International Symposium on Low Power Electronics and Design (ISLPED).

[27]  Dimitrios S. Nikolopoulos,et al.  Software-managed energy-efficient hybrid DRAM/NVM main memory , 2015, Conf. Computing Frontiers.

[28]  Edwin Hsing-Mean Sha,et al.  Energy-Efficient In-Memory Paging for Smartphones , 2016, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems.

[29]  Tajana Simunic,et al.  PDRAM: A hybrid PRAM and DRAM main memory system , 2009, 2009 46th ACM/IEEE Design Automation Conference.

[30]  Yiran Chen,et al.  Utilizing PCM for Energy Optimization in Embedded Systems , 2012, 2012 IEEE Computer Society Annual Symposium on VLSI.

[31]  Edwin Hsing-Mean Sha,et al.  Building high-performance smartphones via non-volatile memory: The swap approach , 2014, 2014 International Conference on Embedded Software (EMSOFT).

[32]  Yuan Xie,et al.  Optimizing bandwidth and power of graphics memory with hybrid memory technologies and adaptive data migration , 2012, 2012 IEEE/ACM International Conference on Computer-Aided Design (ICCAD).

[33]  Michael M. Swift,et al.  FlashVM: Revisiting the Virtual Memory Hierarchy , 2009, HotOS.

[34]  Yiran Chen,et al.  Emerging non-volatile memories: Opportunities and challenges , 2011, 2011 Proceedings of the Ninth IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis (CODES+ISSS).

[35]  Wei-Che Tseng,et al.  Software enabled wear-leveling for hybrid PCM main memory on embedded systems , 2013, 2013 Design, Automation & Test in Europe Conference & Exhibition (DATE).

[36]  Tei-Wei Kuo,et al.  A light-weighted software-controlled cache for PCM-based main memory systems , 2015, 2015 IEEE/ACM International Conference on Computer-Aided Design (ICCAD).

[37]  Vijayalakshmi Srinivasan,et al.  Enhancing lifetime and security of PCM-based Main Memory with Start-Gap Wear Leveling , 2009, 2009 42nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[38]  Orion Hodson,et al.  Whole-system persistence , 2012, ASPLOS XVII.

[39]  Jingtong Hu,et al.  Improving performance and lifetime of DRAM-PCM hybrid main memory through a proactive page allocation strategy , 2015, The 20th Asia and South Pacific Design Automation Conference.

[40]  Weimin Zheng,et al.  MARS: Mobile Application Relaunching Speed-Up through Flash-Aware Page Swapping , 2016, IEEE Trans. Computers.

[41]  Qi Wang,et al.  A 20nm 1.8V 8Gb PRAM with 40MB/s program bandwidth , 2012, 2012 IEEE International Solid-State Circuits Conference.