Opportunistic Page Largification in Hierarchical Page Tables
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing page table systems in computing devices face a trade-off between space efficiency and translation time efficiency, with larger pages being less efficient in memory usage but more efficient in data access for large data requirements, while smaller pages are more efficient for small data needs, and the support for large pages is not robust.
Innovation Solution
The method involves scanning the last level of the page table hierarchy to locate candidate page table entries for conversion to large pages, transferring data to a contiguous memory segment, and adjusting page table entries to create large pages, and vice versa when notified, to dynamically manage page sizes based on data needs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If larger pages are used in the page table system, then translation time efficiency is improved, but space efficiency deteriorates
Solution Approach 1:
The system dynamically converts between small pages and large pages based on runtime conditions. The page table hierarchy can transform 4KB small pages into 2MB large pages when beneficial, and vice versa, allowing the system to adapt page sizes according to actual memory access patterns and process needs rather than using a fixed page size
Solution Approach 2:
The invention changes the page size parameter dynamically based on system state. By monitoring process memory access patterns and converting between different page sizes (4KB to 2MB), the system optimizes the page size parameter to balance translation efficiency and memory utilization according to actual workload requirements
2Loss of substance
If smaller pages are used in the page table system, then space efficiency is improved, but translation time efficiency deteriorates
Solution Approach 1:
The system dynamically converts between small pages and large pages based on runtime conditions. The page table hierarchy can transform 4KB small pages into 2MB large pages when beneficial, and vice versa, allowing the system to adapt page sizes according to actual memory access patterns and process needs rather than using a fixed page size
Solution Approach 2:
The invention changes the page size parameter dynamically based on system state. By monitoring process memory access patterns and converting between different page sizes (4KB to 2MB), the system optimizes the page size parameter to balance translation efficiency and memory utilization according to actual workload requirements
3Speed
If large pages are used, then data access efficiency for large data requirements is improved, but memory usage efficiency deteriorates
Solution Approach 1:
The system dynamically converts between small pages and large pages based on runtime conditions. The page table hierarchy can transform 4KB small pages into 2MB large pages when beneficial, and vice versa, allowing the system to adapt page sizes according to actual memory access patterns and process needs rather than using a fixed page size
Solution Approach 2:
The invention changes the page size parameter dynamically based on system state. By monitoring process memory access patterns and converting between different page sizes (4KB to 2MB), the system optimizes the page size parameter to balance translation efficiency and memory utilization according to actual workload requirements
Data Source
Figure 1
Figure 2~3
Figure 4
AI summary
Page tables in the last level of a hierarchical page table system are scanned for candidate page tables. Candidate page tables are converted to large pages, having a page table entry in a level before the last level of the hierarchical page table system adjusted to be associated with the newly created large page. Upon receiving a notification that a large page is to be converted into a page table, a new page table is created. Each entry in the new page table is associated with a small segment of memory in the large page and an entry in a page table one level before the last level in a hierarchical page table system is adjusted to be associated with the new page table.