Large Page Segmentation for Memory Reclamation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
As memory becomes scarce, operating systems or hypervisors employing large pages experience degraded memory performance, making it difficult to efficiently manage and reclaim memory due to the reduced likelihood of finding matching large pages and increased modification of large pages, which hinders page sharing opportunities.
Innovation Solution
Implement a method to identify and break up large pages into small pages based on sharing opportunities, updating mappings to mark shared small pages as free, and determining the amount of reclaimable memory by scanning for identical small pages within large pages, thereby enhancing memory management and reclamation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If large pages are used for memory mapping, then memory performance is improved when memory is plentiful, but memory performance degrades quickly when memory becomes scarce
Solution Approach 1:
The patent segments large pages into smaller pages (e.g., 2MB large pages into 4KB small pages) to enable fine-grained memory management. This segmentation allows the system to selectively share or unshare specific small pages while maintaining large page mappings for non-shareable content, thus improving adaptability when memory becomes scarce while preserving the performance benefits of large pages where applicable.
Solution Approach 2:
The patent implements dynamic page sharing by allowing the system to transition between large page and small page mappings based on memory availability and sharing opportunities. When memory is plentiful, large pages are used for optimal performance; when memory becomes scarce or sharing opportunities arise, the system dynamically breaks up large pages into small pages to enable page sharing, thus adapting memory management strategy to current system conditions.
2Productivity
If large pages are employed, then memory performance improves, but the likelihood of finding matching pages for sharing decreases
Solution Approach 1:
By segmenting large pages into small pages, the system increases the granularity at which page sharing can be detected and implemented. Instead of searching for matching large pages (which are fewer and larger), the system searches for matching small pages within and across large pages, significantly increasing the likelihood of finding sharing opportunities while maintaining efficient search performance through the smaller, more numerous units.
Solution Approach 2:
The patent introduces a new dimension of page sharing by enabling sharing at the small page level within large pages, rather than only at the large page level. This dimensional change from coarse-grained large page sharing to fine-grained small page sharing within large pages expands the search space for matching pages and increases the probability of finding sharing opportunities.
3Productivity
If large pages are used, then memory performance is improved, but memory reclamation becomes difficult due to increased modification of large pages
Solution Approach 1:
Segmenting large pages into small pages facilitates memory reclamation by allowing the system to identify and free only the specific small pages that are candidates for sharing or reclamation, rather than requiring reclamation of entire large pages. This segmentation reduces the overhead of tracking and managing page reclamation and makes the process more granular and efficient.
Solution Approach 2:
The patent applies local quality by allowing different portions of a large page to have different sharing states. Individual small pages within a large page can be marked as shared or unshared based on their specific characteristics and sharing opportunities, enabling selective memory reclamation without affecting the entire large page. This local control simplifies the reclamation process by focusing only on modifiable small pages.
Data Source
AI summary
Memory performance in a computer system that implements large page mapping is improved even when memory is scarce by identifying page sharing opportunities within the large pages at the granularity of small pages and breaking up the large pages so that small pages within the large page can be freed up through page sharing. In addition, the number of small page sharing opportunities within the large pages can be used to estimate the total amount of memory that could be reclaimed through page sharing.


