Use MTYPE_NC for coarse-grain remote memory
Subsystems (3)
Felix Kuehling
maintainercover Use MTYPE_NC for coarse-grain remote memory
These patches are the result of deliberations with multiple AMD SW and HW teams with the goal of improving Aldebaran performance and harmonizing the Arcturus implementation with it.
Felix Kuehling (2):
drm/amdgpu: Arcturus: MTYPE_NC for coarse-grain remote memory drm/amdgpu: Albebaran: MTYPE_NC for coarse-grain remote memory
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ++++-- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
Signature · 6 lines
2.31.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Felix Kuehling
maintainerPATCH 1/2 drm/amdgpu: Arcturus: MTYPE_NC for coarse-grain remote memory
MTYPE UC was used for a specific use case that ended up not being implemented. Use NC for better performance for coarse-grained memory where cache coherence during shader execution is not required.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +2 -1
@@ -433,7 +433,8 @@ static uint64_t get_pte_flags(struct amdgpu_device *adev, struct kgd_mem *mem) mapping_flags |= coherent ?AMDGPU_VM_MTYPE_CC :AMDGPU_VM_MTYPE_RW ; else - mapping_flags |= AMDGPU_VM_MTYPE_UC; + mapping_flags |= coherent ? + AMDGPU_VM_MTYPE_UC : AMDGPU_VM_MTYPE_NC; }else { mapping_flags |= coherent ?AMDGPU_VM_MTYPE_UC :AMDGPU_VM_MTYPE_NC ;
drivers/gpu/drm/amd/amdkfd/kfd_svm.c +2 -1
@@ -1016,7 +1016,8 @@ svm_range_get_pte_flags(struct amdgpu_device *adev, struct svm_range *prange) mapping_flags |= coherent ?AMDGPU_VM_MTYPE_CC :AMDGPU_VM_MTYPE_RW ; }else { - mapping_flags |=AMDGPU_VM_MTYPE_UC ; + mapping_flags |= coherent ? +AMDGPU_VM_MTYPE_UC :AMDGPU_VM_MTYPE_NC ;if (amdgpu_xgmi_same_hive (adev, bo_adev)) snoop = true; }
Signature · 6 lines
2.31.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Felix Kuehling
maintainerPATCH 2/2 drm/amdgpu: Albebaran: MTYPE_NC for coarse-grain remote memory
In reply to Felix KuehlingMTYPE UC was used for a specific use case that ended up not being implemented. Use NC for better performance for coarse-grained memory where cache coherence during shader execution is not required.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +2 -1
@@ -453,7 +453,8 @@ static uint64_t get_pte_flags(struct amdgpu_device *adev, struct kgd_mem *mem)if (adev->gmc.xgmi.connected_to_cpu) snoop = true; }else { - mapping_flags |=AMDGPU_VM_MTYPE_UC ; + mapping_flags |= coherent ? +AMDGPU_VM_MTYPE_UC :AMDGPU_VM_MTYPE_NC ;if (amdgpu_xgmi_same_hive (adev, bo_adev)) snoop = true; }
drivers/gpu/drm/amd/amdkfd/kfd_svm.c +2 -1
@@ -1034,7 +1034,8 @@ svm_range_get_pte_flags(struct amdgpu_device *adev, struct svm_range *prange)if (adev->gmc.xgmi.connected_to_cpu) snoop = true; }else { - mapping_flags |=AMDGPU_VM_MTYPE_UC ; + mapping_flags |= coherent ? +AMDGPU_VM_MTYPE_UC :AMDGPU_VM_MTYPE_NC ;if (amdgpu_xgmi_same_hive (adev, bo_adev)) snoop = true; }
Signature · 6 lines
2.31.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
This series is Reviewed-by: Oak Zeng <[email protected]>
Regards,
Oak
On 2021-05-10, 7:36 PM, "amd-gfx on behalf of Felix Kuehling" <[email protected] on behalf of [email protected]> wrote:
These patches are the result of deliberations with multiple AMD SW and HW teams with the goal of improving Aldebaran performance and harmonizing the Arcturus implementation with it.
Felix Kuehling (2):
drm/amdgpu: Arcturus: MTYPE_NC for coarse-grain remote memory drm/amdgpu: Albebaran: MTYPE_NC for coarse-grain remote memory
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ++++--
drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
--
2.31.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Coak.zeng%40amd.com%7Cb6429f0dc7084453347708d9140c5c91%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637562865601902303%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=EEC2K46eAbtQOn7ppe%2B4fuxeE8rTaWHN2rqPKk4VyGw%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx