From patchwork Fri Mar 15 02:19:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 10853981 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4A75213B5 for ; Fri, 15 Mar 2019 02:07:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31D472A815 for ; Fri, 15 Mar 2019 02:07:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2661E2A817; Fri, 15 Mar 2019 02:07:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D24AB2A815 for ; Fri, 15 Mar 2019 02:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728178AbfCOCHa (ORCPT ); Thu, 14 Mar 2019 22:07:30 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5252 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726883AbfCOCHa (ORCPT ); Thu, 14 Mar 2019 22:07:30 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 5E8C5AD3B160247E11B7; Fri, 15 Mar 2019 10:07:28 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.408.0; Fri, 15 Mar 2019 10:07:18 +0800 From: Kefeng Wang To: Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , , , CC: Kefeng Wang Subject: [PATCH 2/2] ACPI: NUMA: show match info about PXM ID and offline/online node Date: Fri, 15 Mar 2019 10:19:40 +0800 Message-ID: <20190315021940.86905-3-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190315021940.86905-1-wangkefeng.wang@huawei.com> References: <20190315021940.86905-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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); return min_node; }