NVM Memory Reclamation via Write-Time Sorting
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In mixed structure memory devices, the least recently used (LRU) algorithm for page reclamation can lead to premature wear of non-volatile memory (NVM) pages with high write times, affecting the stability and reliability of the storage unit.
Innovation Solution
A memory reclamation method that reclaims inactive NVM pages in ascending order of their write times, storing them into linked lists or page groups sorted by write times to ensure pages with fewer write times are reclaimed first, thereby achieving wear leveling and improving stability and reliability.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the LRU algorithm is used to select pages for reclamation from inactive NVM pages, then memory reclamation efficiency is improved, but NVM pages with high write times are reclaimed first causing severe wear and reduced stability
Solution Approach 1:
The patent changes the selection parameter from LRU (least recently used) to write time count. Instead of selecting pages based on access time, the system selects inactive NVM pages with the smallest write time counts for reclamation. This parameter change ensures that pages with fewer write operations are reclaimed first, preventing excessive wear on heavily written pages while maintaining efficient memory reclamation.
Solution Approach 2:
The patent applies different reclamation strategies to different types of memory pages. Specifically, it distinguishes between DRAM pages and NVM pages, and further categorizes NVM pages by their write time counts. The system selectively applies the write-time-based selection criterion to inactive NVM pages while using LRU for other pages, optimizing both reliability for NVM and overall reclamation efficiency.
2Quantity of substance
If NVM pages with large write times are reclaimed first to meet memory demand, then memory capacity requirements are satisfied, but the quantity of write times which can be borne by NVM is reduced and wear is unbalanced
Solution Approach 1:
The patent changes the reclamation selection parameter from access-based metrics to write-time-based metrics. By selecting inactive NVM pages with the minimum write time counts for reclamation, the system ensures that pages with fewer write operations are reclaimed first. This maintains wear balance across NVM pages while still satisfying memory capacity requirements through efficient reclamation.
Solution Approach 2:
The patent implements a selective discarding strategy where only inactive NVM pages with low write time counts are discarded for reclamation. The system identifies candidate pages based on write time criteria, selects those with minimum write times, and recovers them for reuse. This approach ensures that heavily written pages are preserved while still providing sufficient memory capacity through targeted reclamation of lightly written pages.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Embodiments of the present invention provide a memory reclamation method and apparatus. The memory reclamation method includes: receiving a memory reclamation request message, where the memory reclamation request message includes a reclamation identifier, and the reclamation identifier is used to indicate a quantity of memory pages requested to be reclaimed; and reclaiming inactive memory pages of an NVM according to the reclamation identifier in ascending order of the write times of inactive memory pages of the non-volatile memory NVM. According to the memory reclamation method and apparatus in the embodiments of the present invention, inactive memory pages of an NVM are reclaimed in ascending order of the write times of inactive memory pages of the NVM, so that a page having a relatively small quantity of inactive memory page write times of the NVM is reclaimed first, and a page having a relatively large quantity of inactive memory page write times of the NVM is reclaimed later. Therefore, wear leveling of the NVM is achieved, and the stability and reliability of a storage unit is improved.