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 70E05C7EE30 for ; Wed, 2 Jul 2025 07:52:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E0A1A6B00B8; Wed, 2 Jul 2025 03:52:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DBB006B00B9; Wed, 2 Jul 2025 03:52:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD1AE6B00BA; Wed, 2 Jul 2025 03:52:37 -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 BCDC36B00B8 for ; Wed, 2 Jul 2025 03:52:37 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 2C134C0383 for ; Wed, 2 Jul 2025 07:52:37 +0000 (UTC) X-FDA: 83618557554.28.F3C0ACF Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf14.hostedemail.com (Postfix) with ESMTP id 1232B100006 for ; Wed, 2 Jul 2025 07:52:34 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=2Dmlemt4; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=mhnJdtmN; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=2Dmlemt4; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=mhnJdtmN; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf14.hostedemail.com: domain of hare@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=hare@suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1751442755; a=rsa-sha256; cv=none; b=jIpEIkGdAa3lewRvmGDk6NJoHVGY1qKiupRJU+ErHXh0GtMkP8V8ETYiHyIwE2IY+V48PO fjKfGSswvd8qWTlqEgHOa9klTImPltBEr95N0k17emmfZb/rBxCqNF1aPW3io1CpXAkisI qQS05sjX6ydFghlVoLMfP2brb+veKvg= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=2Dmlemt4; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=mhnJdtmN; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=2Dmlemt4; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=mhnJdtmN; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf14.hostedemail.com: domain of hare@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=hare@suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1751442755; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Vrd6zl+WM3OV/tfbHoou7lF+MwGRLe6ZMjKCMzGsZ6g=; b=CU3QOPGbEoQpSbvSDx+opFboAcv+uyQ0IFDGCC6Iue2iDQbkyULPTgP9Sx24pv6l6NoLAW 5joIeGMSVKaq+z1IfKT59wJYQRYV3wi6SUral06zGqMmbxbWa3TAoc15hBtgVr5QHbJwJB gR8FOWeoAmM/XfzA07tgXcOOFkoRMPU= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8CD941F445; Wed, 2 Jul 2025 07:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1751442753; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vrd6zl+WM3OV/tfbHoou7lF+MwGRLe6ZMjKCMzGsZ6g=; b=2Dmlemt4Qggb8UXiw2g/647gGcc0Mrx+vWpeYImgxJHg41ya6ZHJJaNSnVkk5FOPFYTtyL hgDoA46ZIKJguUDIVAmzuXmxRCa7ElK1/lXCLXOCbv9BrA8oPLEKJDzX5FfrT5XQfoiilW 3BEbS+K+YOICMoqgkYkbsJGr7XiIeCk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1751442753; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vrd6zl+WM3OV/tfbHoou7lF+MwGRLe6ZMjKCMzGsZ6g=; b=mhnJdtmN69z+vm5ZyiT0v+EZM3Nh4aks4I2HAmSwt/ew+ZuD+MpJvzTcUnr4oJyEsqgk7e d8oc7o2xUROcuyCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1751442753; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vrd6zl+WM3OV/tfbHoou7lF+MwGRLe6ZMjKCMzGsZ6g=; b=2Dmlemt4Qggb8UXiw2g/647gGcc0Mrx+vWpeYImgxJHg41ya6ZHJJaNSnVkk5FOPFYTtyL hgDoA46ZIKJguUDIVAmzuXmxRCa7ElK1/lXCLXOCbv9BrA8oPLEKJDzX5FfrT5XQfoiilW 3BEbS+K+YOICMoqgkYkbsJGr7XiIeCk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1751442753; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vrd6zl+WM3OV/tfbHoou7lF+MwGRLe6ZMjKCMzGsZ6g=; b=mhnJdtmN69z+vm5ZyiT0v+EZM3Nh4aks4I2HAmSwt/ew+ZuD+MpJvzTcUnr4oJyEsqgk7e d8oc7o2xUROcuyCA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 70E6B13A24; Wed, 2 Jul 2025 07:52:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id BPwaG0HlZGi9QgAAD6G6ig (envelope-from ); Wed, 02 Jul 2025 07:52:33 +0000 Message-ID: <86f89a65-f0f6-4462-9eea-ac691de2f3b6@suse.de> Date: Wed, 2 Jul 2025 09:52:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] mm/memory_hotplug: activate node before adding new memory blocks To: David Hildenbrand , Donet Tom , Hannes Reinecke Cc: Oscar Salvador , linux-mm@kvack.org References: <20250701114155.16452-1-hare@kernel.org> <20250701114155.16452-3-hare@kernel.org> <91b9bdfc-57b2-45ba-93f3-e91a95fb32a5@redhat.com> Content-Language: en-US From: Hannes Reinecke In-Reply-To: <91b9bdfc-57b2-45ba-93f3-e91a95fb32a5@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Action: no action X-Stat-Signature: iys4y959w3bmidz1zo1nyu8gcjn3c3o1 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 1232B100006 X-Rspam-User: X-HE-Tag: 1751442754-328106 X-HE-Meta: U2FsdGVkX1/xfqoGZjQz4QOkeNHIKK9SprTu7qz17JYbud6mK4lQxOukCAs4XecvpXjNTzUtjCQHNdmk5+tjeo/Ttwf1L+cbJ9Xvvqz/sjWy+aJHORiTE6vpc6nQUncRfurx1HAO09K5pKlIQgLfIgRR7pdJ6R8Mw+fYMtPZ9FUeCyMv6h1jRth/QTkqUmr7HmwWTYqV5oxfKcuUFUIdtnh6mKMXh5Smm5jee5AfAW96zXL/zfPXtQhlqGtj+o5pNr3VmMUZRsoJda7gOUplULJ1dYO0XTDbzETFZ1Md73svTYQ8G0Pyqt/gUrFecKgZloH6wDdi4C2ORdRipqWfFyhGzslFt67313DdX4r2EGjO0xM92N2yGwTW+4WH45xPmusT+6FI9v6CCwuZaSis4spjntHLjB0nGrpxSQE+J09UnPyVGnGXoMZVhV0Y4S1KpiED/tY82uIxrFbUsgUfkLjE6IWNCbFHDcPtJuthcAuDXBjlftMSOjrhe2J4MsDzwRnDqWjpj7NeFc1EeKNxxzNxcQNsF3ZlfJ2K3JjML+/VG6IeK++foNADMcgVbShnYC8wCVQJ/mf82Bwa5wUnKnwhcZv8/Gx3oP1HSfQclAvEUjQKZBv1wmX/6s2zZx580O7Fwv0dlrWDSz4keiDniiTOv1RgyZZMUrcYu7POTENEFIPoWKvwY+j2UZ2E04vAeTrlnxQxdrQL7CC5wBcIQDlOloo4uCLhuC901E/Lw+sPavxSOjy1gWoTaCqSExDFjd0xunt8RdZhatIbd1NLAqB9b/U91A4B6oEfns6WumNb845k1CIX7emUfyEj9c8mIWxh5b8jkGmSd6sYNHSuMJpJUQrGL4Kx3y1/amcZF41ZwKfp5A00mSlllFN3WNEUkFtDOAlkSGz0uACFWLXr+8OU6y3y5iZfC5qDsTpM7cjOJTttGBXEutdrSa1x1Zp/fWo8OVLiKmQZoA4/Fa/ gflcCW6v 0Dp45sKtcVFscUcGKn3W0wy9Vd7hw23vpAdiP 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 7/2/25 08:36, David Hildenbrand wrote: > On 02.07.25 08:25, Donet Tom wrote: >> Hi Hannes Reinecke >> >> On 7/1/25 5:11 PM, Hannes Reinecke wrote: >>> The sysfs attributes for memory blocks require the node ID to be >>> set and initialized, so move the node activation before adding >>> new memory blocks. This also has the nice side effect that the >>> BUG_ON() can be converted into a WARN_ON() as we now can handle >>> registration errors. >> >> Since this fixes the issue, should we consider adding a Fixes: tag? > > Yeah (I mentioned this to patch #1 only). And we should probably CC stable. > > I would assume the issue is fairly old. > And indeed, as old as to be basically meaningless. The most likely candidate I've found is b9ff036082cd ("mm/memory_hotplug.c: make add_memory_resource use __try_online_node") (Sorry, Oscar, for picking on you :-) Before that the history got obscured by later changes. Problem is that we have two different issues here; the one is the mis-order of uevents vs sysfs attributes, which, from what I can see, is a day-one issue. The other is a crash when accessing sysfs attributes, which I guess crept in with d84f2f5a7552 ("drivers/base/node.c: simplify unregister_memory_block_under_nodes()") but it's hard to be sure. And in either case, any of these is soo old as would affect pretty much everyone. (Oh fsck. _Someone_ will have to do the backports ...) Anyway. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich