Memory Page Migration Between Heterogeneous Processors
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Migrating memory pages of different sizes between heterogeneous processors in a unified virtual memory architecture is complicated due to discrepancies in page sizes, requiring an effective approach to accommodate and optimize memory access.
Innovation Solution
A computer-implemented method for migrating memory pages between different memory units based on supported page sizes and usage history, allowing for splitting and coalescing of pages to optimize storage and access, thereby enabling flexible operation across various memory architectures.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If memory pages are sized differently for CPU and GPU memory units, then memory access efficiency is improved, but page migration complexity increases
Solution Approach 1:
The patent segments a large memory page into multiple smaller memory pages when migrating from GPU memory (which supports large pages) to CPU memory (which only supports small pages). This segmentation allows the migration to proceed by creating multiple smaller page units that are compatible with the destination memory architecture, thereby resolving the page size incompatibility while maintaining migration capability.
Solution Approach 2:
The patent inverts the traditional migration approach by allowing the destination memory unit's page size constraints to dictate the migration process. Instead of forcing the source page size, the system adapts the source page structure to match the destination requirements - coalescing multiple small CPU pages into a large GPU page, or splitting a large GPU page into small CPU pages. This inversion resolves the contradiction by making the migration process flexible rather than rigid.
2Quantity of substance
If large memory pages are migrated to memory units that only store small memory pages, then memory utilization is improved, but migration feasibility deteriorates
Solution Approach 1:
When a large memory page needs to be migrated to a memory unit that only supports small pages, the system automatically segments the large page into multiple smaller pages. Each small page can then be independently migrated to the destination memory unit, ensuring migration feasibility while maintaining the overall memory utilization benefit of the original large page structure.
Solution Approach 2:
The patent changes the page size parameter during migration based on the destination memory unit's capabilities. The system dynamically adjusts the page size from large to small when migrating to CPU memory, or from small to large when migrating to GPU memory. This parameter adaptation ensures that migration feasibility is maintained while still achieving effective memory utilization in the destination unit.
3Speed
If memory pages are split into smaller pages, then memory locality is improved, but page table size increases
Solution Approach 1:
The patent implements dynamic page size management where the system can switch between small and large page configurations based on runtime conditions. When memory locality benefits are needed, small pages are used; when page table space is constrained, large pages are employed. This dynamic approach allows the system to optimize between access speed and page table size requirements adaptively.
Solution Approach 2:
The system applies partial segmentation by splitting large pages into smaller pages only when and where memory locality improvements are needed, rather than universally splitting all pages. This selective approach maintains large page structures in regions where they provide benefit while creating small pages only in regions where locality optimization is required, thereby limiting the increase in page table size to only necessary areas.
Data Source
AI summary
One embodiment of the present invention sets forth a computer-implemented method for migrating a memory page from a first memory to a second memory. The method includes determining a first page size supported by the first memory. The method also includes determining a second page size supported by the second memory. The method further includes determining a use history of the memory page based on an entry in a page state directory associated with the memory page. The method also includes migrating the memory page between the first memory and the second memory based on the first page size, the second page size, and the use history.


