Shared Virtual Memory Data Anchoring for CPU-GPU Page Fault Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Data transfer between a central processing unit (CPU) and a graphics processing unit (GPU) becomes a significant bottleneck due to the slow transmission speed of data mediums, leading to performance and power consumption issues, and existing solutions fail to effectively reduce the frequency of page fault exceptions in shared virtual memory systems.
Innovation Solution
A method and system that configure the CPU to assign tasks to the GPU with data anchored in shared virtual memory, utilizing a prepaging mechanism to lock required data in physical memory before execution, preventing page faults by setting areas to a removal-prohibited state, and using a page fault controller to manage exceptions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If data transfer between CPU and GPU is performed using traditional memory systems, then system compatibility is maintained, but transmission speed is slow creating a performance bottleneck
Solution Approach 1:
The patent applies preliminary action by prefetching data into the GPU's local memory before the GPU needs to process it. The CPU proactively loads required data blocks into the GPU's memory space in advance, so that when the GPU executes computations, the data is already available locally without causing page faults or requiring slow PCIe transfers during computation.
Solution Approach 2:
The patent introduces an intermediary mechanism using shared virtual memory (SVM) as a mediator between CPU and GPU memory spaces. SVM allows both processors to access the same physical memory through different virtual addresses, enabling fast data sharing without traditional PCIe bus transfers. The memory management unit (MMU) acts as the intermediary that handles address translation and synchronization.
2Speed
If shared virtual memory is used to enable fast data access, then data transmission speed improves, but page fault exceptions occur reducing performance
Solution Approach 1:
The patent applies preliminary action by prefetching data into the GPU's local memory before the GPU needs to process it. The CPU proactively loads required data blocks into the GPU's memory space in advance, so that when the GPU executes computations, the data is already available locally without causing page faults or requiring PCIe transfers during computation.
Solution Approach 2:
The patent applies preliminary anti-action by taking measures to prevent page faults before they occur. The system uses memory allocation strategies and data prefetching to ensure that all required data is already in the GPU's accessible memory space before computation begins, thereby preemptively eliminating the harmful effect of page fault exceptions.
3Reliability
If more data is anchored in physical memory to prevent page faults, then execution stability improves, but memory usage increases
Solution Approach 1:
The patent applies local quality by differentiating between data that needs to be anchored in physical memory and data that can remain in virtual memory. Instead of anchoring all data, the system selectively anchors only the data blocks that the GPU will actually access during computation, based on memory access patterns and workload characteristics. This selective approach reduces unnecessary memory consumption while maintaining execution stability.
Solution Approach 2:
The patent applies partial action by anchoring only the necessary portion of data in physical memory rather than all data. The system calculates the minimum required anchored data based on GPU memory access patterns, workload characteristics, and available physical memory, thereby avoiding excessive memory consumption while still preventing page faults for critical data.
Data Source
AI summary
A method and a system for processing data based on shared virtual memory (SVM) are disclosed. The method is applied to a system which includes a central processing unit (CPU) and a graphics processing unit (GPU) that are configured to share a virtual memory record in a storage medium, and the method includes configuring the CPU to assign a task to be executed by the GPU, wherein data required for the task is associated with the virtual memory record; and configuring the CPU to anchor the data required for the task during a period for the task executed by the GPU. Thus, the number of page fault exceptions can be reduced.


