Patchwork [2/2] ACPI: NUMA: show match info about PXM ID and offline/online node

login
register
mail settings
Submitter Kefeng Wang
Date March 15, 2019, 2:19 a.m.
Message ID <20190315021940.86905-3-wangkefeng.wang@huawei.com>
Download mbox | patch
Permalink /patch/749221/
State New
Headers show

Comments

Kefeng Wang - March 15, 2019, 2:19 a.m.
It maybe trigger some issue when the acpi device driver allocs memory
from an offline node, so use alternative acpi_map_pxm_to_online_node()
to find an online node, let's show infomation about proximity ID, mapped
offline node and the nearest online node returned.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/acpi/numa.c | 3 +++
 1 file changed, 3 insertions(+)
Kefeng Wang - March 15, 2019, 8:34 a.m.
On 2019/3/15 10:19, Kefeng Wang wrote:
> It maybe trigger some issue when the acpi device driver allocs memory
> from an offline node, so use alternative acpi_map_pxm_to_online_node()
> to find an online node, let's show infomation about proximity ID, mapped
> offline node and the nearest online node returned.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  drivers/acpi/numa.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
> index 7bbbf8256a41..064c771a7338 100644
> --- a/drivers/acpi/numa.c
> +++ b/drivers/acpi/numa.c
> @@ -121,6 +121,9 @@ int acpi_map_pxm_to_online_node(int pxm)
>  			}
>  		}
>  	}
> +	if (min_node != node)
> +		pr_warn("IORT: PXM %d Mapped to offline node %d, choose nearest online node %d",
> +			pxm, node, min_node);
Should remove IORT prefix, some other table like NFIT, DMAR have PXM filed, waiting for review.
>  
>  	return min_node;
>  }

Patch

diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index 7bbbf8256a41..064c771a7338 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -121,6 +121,9 @@  int acpi_map_pxm_to_online_node(int pxm)
 			}
 		}
 	}
+	if (min_node != node)
+		pr_warn("IORT: PXM %d Mapped to offline node %d, choose nearest online node %d",
+			pxm, node, min_node);
 
 	return min_node;
 }