Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp332731lqh; Fri, 31 May 2024 02:44:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVYUHhnFuc3Kg6W6aVOKGr2+lGf5axmluiY2Ry/594pUxpIVeQotYvqlXb8JCOIGB7BpUGH3qANpOGpK5gyrw6BB3Fgk1C3mLbphTCC6A== X-Google-Smtp-Source: AGHT+IFlfu3kSkaMoFHVJEFLsOrhgN08+M12l912FV8IE90FIGav6j6d/n4dUjEARH+R4Bg2zsbN X-Received: by 2002:a50:a68c:0:b0:578:3335:6e88 with SMTP id 4fb4d7f45d1cf-57a361d540bmr967694a12.0.1717148675228; Fri, 31 May 2024 02:44:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717148675; cv=pass; d=google.com; s=arc-20160816; b=GDCX35hB+MgVmypx9AyDQ9tJNA7qh7ErSW5+mf6WRWTn91YZdL8rr7aYXgt6fr4QkR OWFpin5DP8wtYgzVs6J8pc8kgX9S0kRIv1/5sMYRzKB4LCvWMtFpaks0HbW6ITuQ1xHQ NlR0o4ff4goF+wd1CA5jQHeNJlKRr8eQaAr/ZDbTgct397uDm37ohr9UfpTQmq7CRLCh CEazBP+xjdHutXZx8I0icMpUNhMaXw00+sQdVKbJ1ctFK1BCZJkc1UG80rd4FUg1fPhG CtgCke95t5tZ4barxx+moM7SQsECPZQ/PV3zxdVKztXVE8xVNnLkTM6oE7z7bYDRbwuk v2tw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Ax0Nq4QG4Y3t8iH/IeGmKv/3gS5lnd+9z+UYp6OPSdw=; fh=HZO96cX4ZyrycRh+9LUxEwTiTiy7TMMH6CQU5/Cc43c=; b=XD/Uv+8XohX48OpMt2X1q2hqtTMi2JJIoFCzlINBuQPtbmjYvciaxJjiP520CZWmJ8 RMGTpW4IvCk34/PN4KpIhHuWei9ORwsNBJW4jNhlSNrwNUp996vBHvxhtzGUK2nM2zak EC61ptRSC4vwQ/x189xm3EKZUrjeS08BfEz4MXhQXHposOeNhlJGog3gQK0aZBpv32pg xAP6ME0M1jK+5S7E6t1452RVjGP2BE7VJ9qK3ywGP24xEaHLn+0SzO46cM3DjimR/W6B D2RIEaeQdQVVJpgZGF2Ekwuky6W+/pDqqMpf32fbD01TQEHgKy1FSIOazzeLujhCqHM7 pEZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lldvXWDn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31ca630dsi771967a12.565.2024.05.31.02.44.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 02:44:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lldvXWDn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DF1E61F21A66 for ; Fri, 31 May 2024 09:44:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3B39138485; Fri, 31 May 2024 09:44:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lldvXWDn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F08E013665D for ; Fri, 31 May 2024 09:44:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717148667; cv=none; b=XzDDdSLCkXRnJW//w+06X/FPxyBiM62AXEGiW314anaSZ+5ioqVBHib1Bilx7TjJbBDBBnrnRkXujOrQ7tgxzzLbxSl05EhnOsg2bs9OIUHY9eoSWuum/6zAiQXAdeOSA4tV+DtZQa4Esk3zk8/DKio+gXNlsj3VB3ArZy1IvzE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717148667; c=relaxed/simple; bh=g7uZiVfUTpbSwjMd6U9QyTBugO8rfC8rQMTVhjpqVvo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kCTmM73tYpnWl8kq2l49b2FfMpGIvetQlRyoblGYzeKFUTkKKSHcQJXhsuYcKXX7Fz4u4CV5o6o+TUdeoeOxFYzapgUNnApOkYcTsoj4mnU7UYLubR1Xo00zObnFLYQQ4JAZzMaAjF2m03zcXE5YxTWxKeHXiN+mG/W5JtjbXJA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lldvXWDn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25AB6C116B1; Fri, 31 May 2024 09:44:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717148666; bh=g7uZiVfUTpbSwjMd6U9QyTBugO8rfC8rQMTVhjpqVvo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lldvXWDnTr5ZsMdVI4TWGiD3UxhCzBGltVXIJP24uhIIfxmyChNutM1v8qedY4QQg z3rtp7CxbjVSpA8FSvaus0QfpU8PQDsJ0xwZp6e3XYdoE71qXwVCaUdqhxMEdd/U4W sMr40E/FaHXjbGnjIT1HAFEpIpkSBPebknODyPvgyli01LgqEAL6HyggGI24EYSBua 980RbFLA86A22PK9eRacvPTfETqSk+0MBqUJvVjB3yl2rToguK/DoCDhd1hmmy/2IH 80FZHmxV42qBx9RTMDAzPRM5SSR7aE3W3+Sb6FJN2/zlJkXhXoyjpg9aHkD/UPdeRT LWz71S615AKIg== Date: Fri, 31 May 2024 12:42:34 +0300 From: Mike Rapoport To: Dave Hansen Cc: Jan Beulich , Dave Hansen , Andrew Lutomirski , Peter Zijlstra , lkml Subject: Re: [PATCH] x86/NUMA: don't pass MAX_NUMNODES to memblock_set_node() Message-ID: References: <997fcbc7-4e75-4aa2-974c-15d984f02d02@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Dave, On Wed, May 29, 2024 at 09:08:12AM -0700, Dave Hansen wrote: > On 5/29/24 09:00, Jan Beulich wrote: > >> In other words, it's not completely clear why ff6c3d81f2e8 introduced > >> this problem. > > It is my understanding that said change, by preventing the NUMA > > configuration from being rejected, resulted in different code paths to > > be taken. The observed crash was somewhat later than the "No NUMA > > configuration found" etc messages. Thus I don't really see a connection > > between said change not having had any MAX_NUMNODES check and it having > > introduced the (only perceived?) regression. > > So your system has a bad NUMA config. If it's rejected, then all is > merry. Something goes and writes over the nids in all of the memblocks > to point to 0 (probably). > > If it _isn't_ rejected, then it leaves a memblock in place that points > to MAX_NUMNODES. That MAX_NUMNODES is a ticking time bomb for later. > > So this patch doesn't actually revert the rejection behavior change in > the Fixes: commit. It just makes the rest of the code more tolerant to > _not_ rejecting the NUMA config? It actually does. Before ff6c3d81f2e8 the NUMA coverage was verified against numa_meminfo rather than memblock, so it could detect that only small portion of the memory has node ID assigned. With transition to memblock, the verification relies on node IDs set by the arch code, but since memblock_validate_numa_coverage() only checked for NUMA_NO_NODE is missed the ranges with nid == MAX_NUMNODES. I took Jan's fix for memblock: https://lore.kernel.org/all/1c8a058c-5365-4f27-a9f1-3aeb7fb3e7b2@suse.com but I think that we should replace MAX_NUMNODES with NUMA_NO_NODE in calls to memblock_set_node() in arch/x86. -- Sincerely yours, Mike.