Re: [PATCH 2/3] drm/amd: Decrease warning about missing SRAT table to debug

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

 



Am 2023-01-18 um 17:47 schrieb Mario Limonciello:
As OEMs will control what ACPI tables are on their systems, SRAT
might not be present. To avoid making an assumption that it is
there but still be useful for debugging a missing table decrease
warning about missing table to debug.

Finding out the NUMA node for a device only makes sense on NUMA systems. I suspect a Cezanne laptop is not NUMA. So maybe we should update the condition that leads to calling kfd_find_numa_node_in_srat:

#ifdef CONFIG_ACPI_NUMA
        if (kdev->adev->pdev->dev.numa_node == NUMA_NO_NODE)
                kfd_find_numa_node_in_srat(kdev);
#endif

To something like this:

#ifdef CONFIG_ACPI_NUMA
        if (kdev->adev->pdev->dev.numa_node == NUMA_NO_NODE &&
	    num_possible_nodes() > 1)
                kfd_find_numa_node_in_srat(kdev);
#endif

That way we'd still see a warning if we can't find out the NUMA node of a GPU on a NUMA system, but you won't see a warning on non-NUMA systems.

Regards,
  Felix



Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
  drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
index 3251f4783ba10..a309cbc235c61 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
@@ -1904,7 +1904,7 @@ static void kfd_find_numa_node_in_srat(struct kfd_dev *kdev)
  	/* Fetch the SRAT table from ACPI */
  	status = acpi_get_table(ACPI_SIG_SRAT, 0, &table_header);
  	if (status == AE_NOT_FOUND) {
-		pr_warn("SRAT table not found\n");
+		pr_debug("SRAT table not found\n");
  		return;
  	} else if (ACPI_FAILURE(status)) {
  		const char *err = acpi_format_exception(status);



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

  Powered by Linux