Sharing non-page aligned memory
AssigneeIntel Corporation
InventorsJayanth Rao, Pavan Lanka, Ronald Silvas
Life of this patent
Estimating the term…
Abstract
A method for sharing memory between a central processing unit (CPU) and an input/output (I/O) device of a computing device is described. The method may include creating an allocation of memory for the I/O device to operate on. The method includes detecting whether the allocation is not page-aligned, wherein an allocation is page-aligned when its base address and size be evenly divisible by the applicable page-size. The allocation may be successfully shared, even if not page-aligned, even if an operating system of the computing device doesn't support sharing of non-page-aligned allocations.
Claims21
A method for sharing memory between a central processing unit (CPU) and graphics processing unit (GPU) of a computing device, comprising:
- creating an allocation of memory for the GPU to operate on;
- detecting whether the allocation is not page-aligned, wherein an allocation is page-aligned when a base address of the allocation and size of the allocated are evenly divisible by the applicable page-size;
- and
- successfully sharing the allocation, even if not page-aligned, and even if an operating system of the computing device doesn't support sharing of non-page-aligned allocations.
A computing device, comprising:
- a central processing unit (CPU) that is configured to execute stored instructions;
- a graphics processing unit (GPU) and a GPU page table;
- a storage device that stores instructions, the storage device comprising processor executable code that, when executed by the CPU, is configured to:
- create a shared memory allocation for the GPU to operate on;
- detect whether the allocation is not page-aligned;
- and
- share the allocation, compensating for any lack of operating system support for non-aligned sharing, based on the detection.
The computing device of 12, wherein managing the non-aligned allocation comprises:
- increasing a reported base page to a following page boundary;
- reducing a reported size to a lesser, page-aligned size;
- using a driver-managed page in place of one provided by the operating system;
- or
- any combination of the above.
The computing device of 12, wherein managing the misaligned allocation comprises
- reporting to the operating system a physical size associated the misaligned allocation as relatively less than the physical size associated with the misaligned allocation.
At least one machine readable medium having instructions stored therein that, in response to being executed on a computing device, cause the computing device to:
- create a shared memory allocation for a general processing unit (GPU) to operate on;
- detect whether the allocation is not page-aligned;
- and
- sharing the allocation, compensating for any lack of operating system support for non-aligned sharing, based on the detection.
Dependencies are inferred from the claim text.