From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75F2EC3DA49 for ; Fri, 26 Jul 2024 09:40:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DDDB86B007B; Fri, 26 Jul 2024 05:40:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D8D6D6B0099; Fri, 26 Jul 2024 05:40:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C55816B009C; Fri, 26 Jul 2024 05:40:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A6DE96B007B for ; Fri, 26 Jul 2024 05:40:40 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id ADD3E1C0680 for ; Fri, 26 Jul 2024 09:40:39 +0000 (UTC) X-FDA: 82381408998.05.51981AF Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf23.hostedemail.com (Postfix) with ESMTP id 5C0BA140012 for ; Fri, 26 Jul 2024 09:40:35 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=erbBnHVt; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721986770; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=C+MAeB17CcvlazKfouLAfCHndwCfxv3P+DQnNsCcCSs=; b=u8UByvLv6hm/6Fsj8ZY3eVTd17oRyrvRtpiTt7/a6nHHv4WpPSAFfNPUlFmBARuwL0hiFC RGMgYYqQusIWfTlZbfFTfkURbV/gD684BPBX2zqFHQkjz6d8rysgVrjCx5AL+4yJgpoUcc 52ylHpBRtAs1P3IpcqmbbgMmxKpyEJ8= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=erbBnHVt; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721986770; a=rsa-sha256; cv=none; b=1uXZPuSUxuyGkrWasf5QjEJSAZIZOiUu3q0IzNA5qolTmkUIQgW2JwU7EDiH0MwXfCoAxl VmBIwtnSXTZGKrMSOrDV/x2k2THPvlwwvSm0dm5A4/ov9U4jiXS8LkpGnOqNIda1VUPNFC TrGINvMmdS9PR6myFzxc7ylmxqCbrYI= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 5FE54CE1349; Fri, 26 Jul 2024 09:40:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9535FC32782; Fri, 26 Jul 2024 09:40:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721986830; bh=/W5kbKWSvcsVRYIH6lNhUURaeOalcNxprGj7xwqXc8w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=erbBnHVtheMUAGs7sb6st1OpVR9FaIVHYj78yec90OKFphlkSZV5k/wAOzf9v7bHw qD/B4sk/oLODwsgv3p0XiErsiTqRDrNBJUfunPPt2ly/fcLhz146SfXfrJeznvLkZe U5MzHL6oELYwecQ5CE2FRGA7zc5ak6Om4kOHFE+xDor4Bpwaxj+6BMtxs9zpKRb0zj t0frO2fOt1mK8tuZJlZLn78/gGZpvARM3U+4DMaFSKK7j8fCZBwVSU2h9+v0uuhWmf doJp2N540bOFVoqeMi8DgOk/gCs4xM/TGYVOkNqWaGGBNobmAGDB5q2iYuCtHTHaiN kQwqqR1cv6trg== Date: Fri, 26 Jul 2024 12:40:03 +0300 From: Mike Rapoport To: Zi Yan Cc: linux-kernel@vger.kernel.org, Alexander Gordeev , Andreas Larsson , Andrew Morton , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christophe Leroy , Dan Williams , Dave Hansen , David Hildenbrand , "David S. Miller" , Davidlohr Bueso , Greg Kroah-Hartman , Heiko Carstens , Huacai Chen , Ingo Molnar , Jiaxun Yang , John Paul Adrian Glaubitz , Jonathan Cameron , Jonathan Corbet , Michael Ellerman , Palmer Dabbelt , "Rafael J. Wysocki" , Rob Herring , Samuel Holland , Thomas Bogendoerfer , Thomas Gleixner , Vasily Gorbik , Will Deacon , devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-cxl@vger.kernel.org, linux-doc@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, nvdimm@lists.linux.dev, sparclinux@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2 00/25] mm: introduce numa_memblks Message-ID: References: <20240723064156.4009477-1-rppt@kernel.org> <1D474894-F8AC-427B-8F90-5A6808E77CC5@nvidia.com> <6336C276-113E-4D93-A09E-13420A6438D8@nvidia.com> <231F6DF6-96C8-4149-92CF-4FC03C9FE357@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <231F6DF6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87DhXWCyQpyKRP77XSmEaOiq4a4JMitBNaYYaN+ncdeaIdaaGw3S+J DHqe/W7m j1uTeZeKvy8UaoJlNqMzEjSXnxebFha5Vtwk/2KqHc/6Wf8C0xoxH9WixIzxQTKFP4HgYROqNrAymKypkXFmRv/zGkcmQzkWJ/Cf+x9SKqJHKpqMV1syhQC/2REKRd5ex4zKqXTeCVy5I4oGx/A7jBYG6ZImXEuc0pMAzDYvjfLHebiylqeTjc033t9DV5gTSJTwHUTSHUgmL/KySA4cJeoV7YMInpb5eSYsHnzdF5mEs4nm89C1mcqzBv4tjiiVZ7kK0iSiQ5zFBOThCEc249LdwLRCLgbUU10ERD5Mm9W70YZ+Zt4eI4zPUs3UIie2loQ7o0F5oTxA5gQPRE8nkkyjQiiLVMEic1RuV6jFoxnwmEfiw4WNCxz3l5uu0vy2yAExNhB1cviLc3H8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Jul 24, 2024 at 10:48:42PM -0400, Zi Yan wrote: > On 24 Jul 2024, at 20:35, Zi Yan wrote: > > On 24 Jul 2024, at 18:44, Zi Yan wrote: > >> > >> Hi, > >> > >> I have tested this series on both x86_64 and arm64. It works fine on x86_64. > >> All numa=fake= options work as they did before the series. > >> > >> But I am not able to boot the kernel (no printout at all) on arm64 VM > >> (Mac mini M1 VMWare). By git bisecting, arch_numa: switch over to numa_memblks > >> is the first patch causing the boot failure. I see the warning: > >> > >> WARNING: modpost: vmlinux: section mismatch in reference: numa_add_cpu+0x1c (section: .text) -> early_cpu_to_node (section: .init.text) > >> > >> I am not sure if it is red herring or not, since changing early_cpu_to_node > >> to cpu_to_node in numa_add_cpu() from mm/numa_emulation.c did get rid of the > >> warning, but the system still failed to boot. > >> > >> Please note that you need binutils 2.40 to build the arm64 kernel, since there > >> is a bug(https://sourceware.org/bugzilla/show_bug.cgi?id=31924) in 2.42 preventing > >> arm64 kernel from booting as well. > >> > >> My config is attached. > > > > I get more info after adding earlycon to the boot option. > > pgdat is NULL, causing issues when free_area_init_node() is dereferencing > > it at first WARN_ON. > > > > FYI, my build is this series on top of v6.10 instead of the base commit, > > where the series applies cleanly on top v6.10. > > OK, the issue comes from that my arm64 VM has no ACPI but x86_64 VM has it, > thus on arm64 VM numa_init(arch_acpi_numa_ini) failed in arch_numa_init() > and the code falls back to numa_init(dummy_numa_init). In dummy_numa_init(), > before patch 23 "arch_numa: switch over to numa_memblks", numa_add_memblk() > from drivers/base/arch_numa.c is called on arm64, which unconditionally > set 0 to numa_nodes_parsed. This is missing in the x86 version of > numa_add_memblk(), which is now used by all arch. By adding the patch > below, my arm64 kernel boots in the VM. > > > diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c > index 806550239d08..354f15b8d9b7 100644 > --- a/drivers/base/arch_numa.c > +++ b/drivers/base/arch_numa.c > @@ -279,6 +279,7 @@ static int __init dummy_numa_init(void) > pr_err("NUMA init failed\n"); > return ret; > } > + node_set(0, numa_nodes_parsed); > > numa_off = true; > return 0; > > > Feel free to add > > Tested-by: Zi Yan # for x86_64 and arm64 > > after you incorporate the fix. Thanks a lot for testing, debugging and fixing! > > -- > Best Regards, > Yan, Zi -- Sincerely yours, Mike.