Virtual Frame Buffer Generation for GPU Memory Fragmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The initial partitioning of frame buffer memory in GPUs that utilize virtual functions and virtual machines for system virtualization is inefficient, leading to fragmentation and inability to fully utilize memory resources, as it is not possible to deallocate and reallocate memory effectively to meet varying demands of virtual machines.
Innovation Solution
A virtual frame buffer generation technique is employed, where scattered pages of memory are virtually concatenated to create a contiguous memory space for virtual machines, allowing non-contiguous memory allocation that appears contiguous to the VMs, thereby reducing fragmentation and optimizing memory usage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If frame buffer memory is partitioned at boot time or during VF assignment, then each VF receives a contiguous region of frame buffer memory, but the allocation cannot be adjusted when VFs are removed and reassigned, leading to memory fragmentation and underutilization
Solution Approach 1:
The frame buffer memory is divided into multiple discrete memory regions, each associated with a specific virtual function. When a VF is removed, its corresponding memory region can be independently deallocated and made available for reallocation to other VFs, enabling flexible memory management without affecting other VFs' allocations.
Solution Approach 2:
The memory allocation system transitions from a static partitioning scheme to a dynamic allocation mechanism where memory regions can be allocated, deallocated, and reallocated based on the current set of active virtual functions. This allows the system to adapt memory distribution to changing VF configurations in real-time.
2Ease of manufacture
If initial partitioning allocates fixed contiguous memory regions to VFs, then memory allocation is simple, but it is impossible to deallocate and recreate VFs with increased memory, resulting in memory wastage
Solution Approach 1:
An intermediary data structure is introduced to manage the mapping between virtual functions and their associated memory regions. This intermediary layer handles the complexity of allocation, deallocation, and reallocation operations, maintaining simplicity for VF creation while enabling flexible memory management and preventing wastage.
3Adaptability or versatility
If scattered memory pages are allocated to meet varying VM demands, then memory allocation flexibility increases, but the memory appears non-contiguous to VMs, causing fragmentation issues
Solution Approach 1:
The system creates a virtual copy or mapping of scattered physical memory pages that presents a contiguous address space to the virtual machines. This virtual contiguous representation allows VMs to access memory as if it were continuous, while the underlying physical pages can be scattered and dynamically allocated from available memory regions.
Data Source
AI summary
An apparatus includes a graphics processing unit (GPU) and a frame buffer. The frame buffer is coupled to the GPU. Based upon initialization of a virtual function, a plurality of pages are mapped into a virtual frame buffer. The plurality of pages are mapped into the virtual frame buffer by using a graphics input/output memory management unit (GIOMMU) and an associated page table.


