OSDN Git Service

drm/amdkfd: report the numa weight between host and device over xgmi
authorJonathan Kim <jonathan.kim@amd.com>
Wed, 21 Apr 2021 19:08:18 +0000 (15:08 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 May 2021 22:06:43 +0000 (18:06 -0400)
GPUs connected to CPUs over xGMI are bidirectional so set weight by a
single hop both ways.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Tested-by: Ramesh Errabolu <ramesh.errabolu@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_crat.c

index c60e826..03c6cb5 100644 (file)
@@ -1140,6 +1140,7 @@ static int kfd_fill_gpu_direct_io_link_to_cpu(int *avail_size,
                 */
                sub_type_hdr->flags |= CRAT_IOLINK_FLAGS_BI_DIRECTIONAL;
                sub_type_hdr->io_interface_type = CRAT_IOLINK_TYPE_XGMI;
+               sub_type_hdr->num_hops_xgmi = 1;
        } else {
                sub_type_hdr->io_interface_type = CRAT_IOLINK_TYPE_PCIEXPRESS;
        }