Re: [PATCH] drm/amdkfd: Make EXT_COHERENT parameter affect APU svm memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2023-10-10 10:32, Francis, David wrote:

[AMD Official Use Only - General]


[AMD Official Use Only - General]


By the intended semantics of the EXT_COHERENT parameter,
it should cause the driver to use MTYPE_UC instead of
MTYPE_NC on non-local gfx9.4.3 APU memory.

Signed-off-by: David Francis <David.Francis@xxxxxxx>
---
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index 7b81233bc9ae..d9ef937308ed 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -1286,7 +1286,7 @@ svm_range_get_pte_flags(struct kfd_node *node,
                         if (num_possible_nodes() <= 1)
                                 mapping_flags |= mtype_local;
                         else
-                               mapping_flags |= AMDGPU_VM_MTYPE_NC;
+                               mapping_flags |= ext_coherent ? AMDGPU_VM_MTYPE_UC : AMDGPU_VM_MTYPE_NC;

Thanks for finding this bug, I think on NUMA system with ext_coherent, we should use CC for local and UC for remote memory from another NUMA node.

The NUMA locality check is done in amdgpu_gmc_override_vm_pte_flag now, seems we need refactor and move the check here in order to use the prange->flags.


Regards,

Philip

                 /* system memory accessed by the dGPU */
                 } else {
                         mapping_flags |= AMDGPU_VM_MTYPE_UC;
--
2.34.1

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux