diff options
author | Alex Sierra <alex.sierra@amd.com> | 2021-05-05 14:15:50 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-07-01 00:05:41 -0400 |
commit | 1d5dbfe6c06a5269b535f8e6b13569f32c42ea60 (patch) | |
tree | 9b48ab364d61ba4a2db6418d2b4006762ead63fa /lib/mpi/mpi-sub-ui.c | |
parent | 278a708758b5fc6d3101776b0e3846a8cd37e188 (diff) |
drm/amdkfd: classify and map mixed svm range pages in GPU
[Why]
svm ranges can have mixed pages from device or system memory.
A good example is, after a prange has been allocated in VRAM and a
copy-on-write is triggered by a fork. This invalidates some pages
inside the prange. Endding up in mixed pages.
[How]
By classifying each page inside a prange, based on its type. Device or
system memory, during dma mapping call. If page corresponds
to VRAM domain, a flag is set to its dma_addr entry for each GPU.
Then, at the GPU page table mapping. All group of contiguous pages within
the same type are mapped with their proper pte flags.
v2:
Instead of using ttm_res to calculate vram pfns in the svm_range. It is now
done by setting the vram real physical address into drm_addr array.
This makes more flexible VRAM management, plus removes the need to have
a BO reference in the svm_range.
v3:
Remove mapping member from svm_range
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions