Modern smartphones are getting increasingly feature rich and have the capability far beyond simply calling or texting. Many of applications have been developed for it and bring great user experience. Howerver, the richer functionality an application can provide, the more demanding it is on computing, memory and storage resources. Thus, large DRAM is required for high-performance smartphones. However, the more DRAM, it means the more energy consumption, leading to rise more pressure on battery lifetime.
Fortunately, swapping is an effective way to extend memory space by writing inactive pages to backing storage. However, due to the performance and endurance issues of mobile internal flash memory, swapping is disabled in mobile devices. Nowadays, with the development of emerging NVM technologies, NVMs are considered the most promising DRAM alternatives due to their attractive features, such as byte-addressable, high-density, low standby power, etc. Moreover, NVMs can provide near DRAM performance. Utilzing those attractive features of NVM, we proposed NVM-Swap, the NVM based high-performance and energy efficient swapping for smartphones.
NVM-Swap is an NVM (Non-Volatile Memory) based swapping for smartphones. In our architecture, NVM is attached to the memory bus, side by side with DRAM, and shares part of the physical address with it. Swap in and out are through the memory interface. Different from the hybrid approach, which treats NVM as main memory, we treat NVM as the swap space.
To remove unnecessary overheads, we propose Copy-on-Write Swap-in (COWS). For read-only requests, data are read directly from the NVM swap space without copying it back to DRAM. To address the endurance issue of NVM, we designed a heap based wear leveling algorithm, namely Heap-Wear. Experimental results show that Heap-Wear can evenly distribute writes to the whole NVM swap space.
NVM-Swap was developed by College of Computer Science of Chongqing University. This technique is described in the papers below. NVM-Swap is openly available under the GPL licence, please kindly cite the following papers if they are used in a publication.
NVM-Swap is implemented into Android's Linux kernel (version 3.4). NVM-Swap is evaluated based on Google Nexus 5 smartphone. Just search the Internet how to compile and install kernel for Nexus 5. Here, we provide the customized kernel with NVM-Swap and the tool to enabled NVM-Swap. Note that the customized Linux kernel is distributed under the GPL licence, anyone has the right to modify and re-distribute it.
Duo Liu (Faculty)
College of Computer Science, Chongqing University, China
Email:
Homepage: http://www.cs.cqu.edu.cn/public/tindex/T0006
Kan Zhong
College of Computer Science, Chongqing University, China
Email:
Tianzheng Wang
Department of Computer Science, University of Toronto, Canada
Email:
Homepage: http://www.cs.utoronto.ca/~tzwang
Xiao Zhu
College of Computer Science, Chongqing University, China
Email:
Linbo Long
College of Computer Science, Chongqing University, China
Email:
Kan Zhong (kzhong1991@cqu.edu.cn)