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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EBFDCD4978C for ; Sun, 1 Dec 2024 19:51:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OMkyX9/uV7ROwJVULkYEjXVHe1+msFTJXSsL1rb+w08=; b=cEvY1sovPmgN1QURFgz2uIKwJg pUma9SsQ9cB7bwxs03dVDwrcB3Ae9C2o11qKLVv1+VDMDQh9vGH9VeQ5qi4NNKBwlte7RYWpDGX/y UVCYhImokZ/GLswc4cFkBdsC2TlidewwNRSdWQmi4b+JGHtjECxj2feS1+Zy4naOZCSITL/eWv5E/ yNPt3XH4Hfri09iCEJHZDYZ4tAMXHNOhntl8FGuIoHQWLNbTTANUHxk/dKXAVH7LgacO5Mrb/JxZk BX3qkSrxP//VlGx9NMSTU7yiY17y/e4pGHhoZIdQ5JXWwEIWlwGlGGR18PuDRsaw/HXhxM9G3kBV+ tifQmsTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tHpxy-00000004I2L-1pbh; Sun, 01 Dec 2024 19:50:50 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tHpwz-00000004Hwy-0iCe for linux-arm-kernel@lists.infradead.org; Sun, 01 Dec 2024 19:49:50 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 8009DA402A1; Sun, 1 Dec 2024 19:47:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30426C4CECF; Sun, 1 Dec 2024 19:49:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733082587; bh=vUtqPxz5MaSnBJg2Nyf2KgaiX3f+2NOOKwsOjTqR/gQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=b449ZUji2aDtfbybQR5pTge9+EUghDgV4Te/PCjgzZ9oemmPgPl6b8VXX8f10tnDT ekQJL+tzThLvoNNAd29oE2IITGdD+x72kSeHZz/vnH/3JM5jqQCffXPPMQm7rp1Y6S 9B32vi1ffXlSIkVrxZG88m4LLHm5D+sqV2BpZIw06nz+mC8ljkD9xQTubaqb3s1z+C 4eR6DCbKgbQ6Iaqf/42T5ZyqHquDAbZ3aQCP3Xn3bOCyXlATG2mMepirgEun23490w hXvhI3W7nQcgsH97jCmsViZr5MmB4K3Ag99s9uFqAu4nMWihktziExzj+W/yp0lKsV pi4Gtp0/8uBuQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tHpwu-00H96x-So; Sun, 01 Dec 2024 19:49:44 +0000 Date: Sun, 01 Dec 2024 19:49:44 +0000 Message-ID: <86zflftc87.wl-maz@kernel.org> From: Marc Zyngier To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Zi Yan , Dan Williams , David Hildenbrand , Andrew Morton , stable@vger.kernel.org Subject: Re: [PATCH v2] arch_numa: Restore nid checks before registering a memblock with a node In-Reply-To: References: <20241201092702.3792845-1-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: rppt@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, ziy@nvidia.com, dan.j.williams@intel.com, david@redhat.com, akpm@linux-foundation.org, stable@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241201_114949_336978_B20FBEB1 X-CRM114-Status: GOOD ( 30.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Mike, On Sun, 01 Dec 2024 19:32:22 +0000, Mike Rapoport wrote: > > Hi Marc, > > On Sun, Dec 01, 2024 at 09:27:02AM +0000, Marc Zyngier wrote: > > Commit 767507654c22 ("arch_numa: switch over to numa_memblks") > > significantly cleaned up the NUMA registration code, but also > > dropped a significant check that was refusing to accept to > > configure a memblock with an invalid nid. > > ... > > > while previous kernel versions were able to recognise how brain-damaged > > the machine is, and only build a fake node. > > > > Use the memblock_validate_numa_coverage() helper to restore some sanity > > and a "working" system. > > > > Fixes: 767507654c22 ("arch_numa: switch over to numa_memblks") > > Suggested-by: Mike Rapoport > > Signed-off-by: Marc Zyngier > > Cc: Catalin Marinas > > Cc: Will Deacon > > Cc: Zi Yan > > Cc: Dan Williams > > Cc: David Hildenbrand > > Cc: Andrew Morton > > Cc: stable@vger.kernel.org > > --- > > drivers/base/arch_numa.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c > > index e187016764265..c63a72a1fed64 100644 > > --- a/drivers/base/arch_numa.c > > +++ b/drivers/base/arch_numa.c > > @@ -208,6 +208,10 @@ static int __init numa_register_nodes(void) > > { > > int nid; > > > > + /* Check the validity of the memblock/node mapping */ > > + if (!memblock_validate_numa_coverage(1)) > > I've changed this to memblock_validate_numa_coverage(0) and applied along > with my patch that changed memblock_validate_numa_coverage() to work with > 0: > > https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git/log/?h=thunderx-fix > > Can you please verify that it works on your "quality hardware"? Commit 427c6179e159b in your tree still has memblock_validate_numa_coverage(1). Forgot to push out the updated version? Flipping this to 0 locally, I have verified that this still allows the old thing to trudge along: root@duodenum:~# uname -a Linux duodenum 6.12.0-12115-g427c6179e159-dirty #3896 SMP PREEMPT Sun Dec 1 19:43:13 GMT 2024 aarch64 Thanks again, M. -- Without deviation from the norm, progress is not possible.