drm/amd: Check that a system is a NUMA system before looking for SRAT
Subsystems (3)
PATCH 1/1 drm/amd: Check that a system is a NUMA system before looking for SRAT
It's pointless on laptops to look for the SRAT table as these are not NUMA. Check the number of possible nodes is > 1 to decide whether to look for SRAT.
--- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +2 -1
@@ -2041,7 +2041,8 @@ static int kfd_fill_gpu_direct_io_link_to_cpu(int *avail_size, sub_type_hdr->proximity_domain_from = proximity_domain;#ifdef CONFIG_ACPI_NUMA -if (kdev->adev->pdev->dev.numa_node ==NUMA_NO_NODE ) +if (kdev->adev->pdev->dev.numa_node ==NUMA_NO_NODE && +num_possible_nodes () >1 )kfd_find_numa_node_in_srat (kdev);#endif #ifdef CONFIG_NUMA
Signature · 1 line
2.34.1
Quoted 6 lines · Mario Limonciello
It's pointless on laptops to look for the SRAT table as these are not NUMA. Check the number of possible nodes is > 1 to decide whether to look for SRAT.
Suggested-by Felix Kuehling <[email protected]>Signed-off-by Mario Limonciello <[email protected]>
I think we discussed this a while ago and I don't remember the exact issue that was meant to fix. Was just to get rid of an irritating warning in the kernel log? Anyway, the patch looks good to me.
Quoted 18 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdkfd/kfd_crat.c +2
-1@@ -2041,7 +2041,8 @@ static int kfd_fill_gpu_direct_io_link_to_cpu(int *avail_size, sub_type_hdr->proximity_domain_from = proximity_domain;#ifdef CONFIG_ACPI_NUMA -if (kdev->adev->pdev->dev.numa_node ==NUMA_NO_NODE ) +if (kdev->adev->pdev->dev.numa_node ==NUMA_NO_NODE && +num_possible_nodes () >1 )kfd_find_numa_node_in_srat (kdev);#endif #ifdef CONFIG_NUMA
[Public]
Quoted 11 lines · Mario Limonciello
Quoted 6 lines
It's pointless on laptops to look for the SRAT table as these are not NUMA. Check the number of possible nodes is > 1 to decide whether to look for SRAT.
Suggested-by Felix Kuehling <[email protected]>Signed-off-by Mario Limonciello <[email protected]>I think we discussed this a while ago and I don't remember the exact issue that was meant to fix. Was just to get rid of an irritating warning in the kernel log? Anyway, the patch looks good to me.
Yeah I forgot all about sending out the fix until I noticed it again recently.
Quoted 2 lines
Reviewed-by Felix Kuehling <[email protected]>
Thanks!
Quoted 22 lines
Review
Quoted 7 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdkfd/kfd_crat.cdrivers/gpu/drm/amd/amdkfd/kfd_crat.c static int kfd_fill_gpu_direct_io_link_to_cpu(int
Quoted 4 lines
index
950af6820153..3dcd8f8bc98e100644drivers/gpu/drm/amd/amdkfd/kfd_crat.c +0
-0@@ -2041,7 +2041,8 @@ static int kfd_fill_gpu_direct_io_link_to_cpu(int
*avail_size,Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +2
-1sub_type_hdr->proximity_domain_from = proximity_domain;#ifdef CONFIG_ACPI_NUMA -if (kdev->adev->pdev->dev.numa_node ==NUMA_NO_NODE ) +if (kdev->adev->pdev->dev.numa_node ==NUMA_NO_NODE && +num_possible_nodes () >1 )kfd_find_numa_node_in_srat (kdev);#endif #ifdef CONFIG_NUMA