Skip to main content
QUICK REVIEW

[Paper Review] SoftWear: Software-Only In-Memory Wear-Leveling for Non-Volatile Main Memory

Christian Hakert, Kuan-Hsun Chen|arXiv (Cornell University)|Apr 7, 2020
Parallel Computing and Optimization TechniquesComputer Science25 references5 citations
TL;DR

This paper proposes a software-only, hardware-agnostic wear-leveling system for non-volatile main memory (NVM) that uses CPU features—memory management unit (MMU), performance counters, and interrupts—to approximate write counts and enable aging-aware wear-leveling. By combining coarse-grained page-level remapping via the MMU and fine-grained stack relocation in a circular manner, it achieves up to 78.43% of the ideal memory lifetime, improving endurance by over 900x compared to unmitigated wear-out.

ABSTRACT

Several emerging technologies for byte-addressable non-volatile memory (NVM) have been considered to replace DRAM as the main memory in computer systems during the last years. The disadvantage of a lower write endurance, compared to DRAM, of NVM technologies like Phase-Change Memory (PCM) or Ferroelectric RAM (FeRAM) has been addressed in the literature. As a solution, in-memory wear-leveling techniques have been proposed, which aim to balance the wear-level over all memory cells to achieve an increased memory lifetime. Generally, to apply such advanced aging-aware wear-leveling techniques proposed in the literature, additional special hardware is introduced into the memory system to provide the necessary information about the cell age and thus enable aging-aware wear-leveling decisions. This paper proposes software-only aging-aware wear-leveling based on common CPU features and does not rely on any additional hardware support from the memory subsystem. Specifically, we exploit the memory management unit (MMU), performance counters, and interrupts to approximate the memory write counts as an aging indicator. Although the software-only approach may lead to slightly worse wear-leveling, it is applicable on commonly available hardware. We achieve page-level coarse-grained wear-leveling by approximating the current cell age through statistical sampling and performing physical memory remapping through the MMU. This method results in non-uniform memory usage patterns within a memory page. Hence, we further propose a fine-grained wear-leveling in the stack region of C / C++ compiled software. By applying both wear-leveling techniques, we achieve up to $78.43\%$ of the ideal memory lifetime, which is a lifetime improvement of more than a factor of $900$ compared to the lifetime without any wear-leveling.

Motivation & Objective

  • To address the limited write endurance of NVM technologies like PCM and FeRAM, which can fail within minutes under high-write workloads.
  • To overcome the reliance on specialized hardware for write-count tracking in existing wear-leveling schemes, which increases cost and complexity.
  • To enable aging-aware wear-leveling on commodity hardware by leveraging widely available CPU features such as MMU, performance counters, and interrupts.
  • To reduce memory wear non-uniformity through coarse-grained page-level remapping and fine-grained stack region wear balancing.
  • To demonstrate that software-only wear-leveling can achieve near-ideal memory lifetime with acceptable runtime overhead.

Proposed method

  • Uses performance counters to generate interrupts at regular intervals (every n memory writes) to sample write distribution statistically.
  • Employs MMU-based page-level remapping to physically relocate memory pages based on approximated write counts.
  • Implements a circular stack relocation mechanism by copying stack contents to new locations and updating the stack pointer via hardware-aided wraparound.
  • Configures memory protection and access permissions to log target addresses during write sampling for write-count approximation.
  • Combines coarse-grained MMU remapping with fine-grained stack-level wear balancing to reduce hotspots within memory pages.
  • Uses normalized endurance (NE) as a metric to compare wear-leveling effectiveness against the theoretical ideal lifetime.

Experimental results

Research questions

  • RQ1Can wear-leveling for NVM be effectively achieved without specialized memory hardware?
  • RQ2To what extent can standard CPU features (MMU, performance counters, interrupts) approximate write counts for aging-aware wear-leveling?
  • RQ3How effective is a software-only approach in balancing write distribution across NVM cells compared to ideal hardware-based wear-leveling?
  • RQ4Can fine-grained wear-leveling of the stack region significantly improve overall memory lifetime?
  • RQ5What is the trade-off between wear-leveling quality and runtime overhead in a software-only solution?

Key findings

  • The proposed software-only wear-leveling system achieves up to 78.43% of the theoretically ideal memory lifetime, representing a lifetime improvement of over 900x compared to no wear-leveling.
  • The combination of coarse-grained MMU-based remapping and fine-grained circular stack relocation effectively reduces write non-uniformity within memory pages.
  • The system operates entirely on commodity hardware without requiring custom memory controllers or additional chip area.
  • The performance overhead is acceptable and tunable, enabling a trade-off between wear-leveling quality and runtime cost.
  • The method enables significant endurance improvement even with statistical approximation of write counts, demonstrating feasibility of software-only wear-leveling.
  • The approach is extensible and could be adapted to other memory segments like data/bss and heap through dynamic relocation techniques.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.