memif is a Linux-compatible OS service for managing modern heterogeneous memory.
Memory in modern computers is embracing layers that have disparate capacity, bandwidth, latency, and power consumption. Towards better overall performance and efficiency, we advocate that software should directly manage data move within such heterogeneous memory.
To this end, we build memif, a Linux OS module that supports asynchronous, DMA-accelerated memory move. Unlike userspace DMA drivers, memif is protected and compatible with commodity OSes. Its low-overhead, low-latency interface is constructed based on two primary ideas:
Making user and kernel directly share lock-free data structures, including a unique red-blue lock-free queue;
Using a kernel thread to fetch memory move requests and post completion notifications without synchronizing with applications.
As of 12/2015, the prototype of memif works on top of TI’s Keystone2 SoC. The Keystone2 features a heterogeneous memory hierarchy: fast, medium-sized on-chip SRAM (called MSMC) and large, slow DRAM.
An x86 porting is available upon request.
[ASPLOS’16] "memif: Towards Programming Heterogeneous Memory Asynchronously," Felix Xiaozhu Lin and Xu Liu, to appear at Proc. ACM Int. Conf. Architectural Support for Programming Languages and Operating Systems (ASPLOS), March 2016.
memif was supported in part by NSF Award CNS-1464157 and NSF Award CCF-1464357.
We thank Texas Instruments for their kind donation of Keystone2 development boards.
memif has benefited from various projects, for instance
the “fake” NUMA support for ARM
All the userspace programs and kernel modules resulted from this project are under FreeBSD license.
Copyright (c) 2015-2016, Purdue University
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Purdue University.