| Dynamic Random Access Memory(DRAM)technology is facing high power consumption and scalability problems,which limits the development of DRAM technology.Emerging persistent memory(PM)offers compatible performance against DRAM while having low power consumption and non-volatility,making PM a supplement to DRAM.PM supports a few access modes,among which DAX mode enables applications to leverage PM’s non-volatility and avoid the overhead of copying data through the page cache.However,existing system software for DAX mode has not been aware of PM’s lower endurance,resulting PM device fails due to the rapid worn out of PM cells.Although a lot of researches have proposed wear-leveling techniques for PM,these methods cannot be directly applied to PM in DAX mode since they can’t distribute writes across all PM pages and may result in crash consistency problems.In order to distribute writes across all PM pages while guaranteeing the crash consistency of DAX-capable PM Systems,WellPM(Wear-leveling for Persistent Memory Systems)is proposed.WellPM achieves global wear-leveling via hardware/software cooperation.Specifically,the hardware conducts intra-page wear-leveling and tracks pages suffered most writes(ie hot pages),while the software allocates free pages and migrates hot pages.Since different PM pages have different characteristics,it’s necessary to allocate and migrate memory in various manners.WellPM divides memory into four basic types: the exclusive memory that each process mutually exclusive access to,the mapped memory mapped into processes’ virtual memory space,the reserved memory that has fixed size and is shared among multiple processes,the shared memory that has increasing size and is shared among multiple processes.WellPM maps the reserved memory and the the shared memory into continuous virtual memory address ranges when allocating and maintains mapping tables to persist the mapping relationships.WellPM migrates exclusive memory by changing the value of pointer variables.WellPM migrates mapped memory by updating processes’ page tables and files’ inodes.WellPM migrates the reserved memory and the the shared memory by updating mapping tables and processes page tables.A platform named WellPM-bench to simulate the function of the assumed hardware has been realized.Macro-benchmark based experiments show that WellPM imporves system lifetime by 2-4 orders of magnitude compared with the most advanced wear-leveling technologies so far.Meanwhile,WellPM-bench incurs 1.88%~33.33% performance overhead and WellPM incurs just 0.15%~2.70% performance overhead. |