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 A07B4C71155 for ; Mon, 16 Jun 2025 14:10:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 351518D0007; Mon, 16 Jun 2025 10:10:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3283D8D0005; Mon, 16 Jun 2025 10:10:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 23E548D0007; Mon, 16 Jun 2025 10:10:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 174348D0005 for ; Mon, 16 Jun 2025 10:10:50 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id BB43C12047A for ; Mon, 16 Jun 2025 14:10:49 +0000 (UTC) X-FDA: 83561449818.26.95B3CF8 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf09.hostedemail.com (Postfix) with ESMTP id 371B8140015 for ; Mon, 16 Jun 2025 14:10:46 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=cLrKKGdf; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=dny4tXlS; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=g3VRNMnF; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=tOk6EJwq; spf=pass (imf09.hostedemail.com: domain of vbabka@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1750083047; 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=gvIC/uuDHCtY1vVb5K1eQEc7EXM23z+t5pvf9m+AhSQ=; b=KtP3S12AM0lD9Aq5FdMt6dyGJOuim1zo89eEEwfdZe7VGzr/KRsyN73UHgaGeIQhmqxp7l Zh1+51g45GtU4pAPh7X7wHMDoc8tNl+InxbkoY3CT5IyTchX24B8NXcTpMdOLZBZJnzxEh SqYEuU9OataJ6W2cyXFlWjm7db1B7OM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1750083047; a=rsa-sha256; cv=none; b=rW4KTzgw6w2dGUUuOORgVhOsBuFFs+pzELQPtbowipWb0ysUbOpjRp+sC5zFr4vu7tDAAl 15Kau+ytH1W4rM858j/VlRVjBeZJRKbC2V01HCC81v3n2aw8swSMUxEkaQE8NgITpPvODP RmggWZxgjcZP28SjckKn7xa/MGpYB2Y= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=cLrKKGdf; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=dny4tXlS; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=g3VRNMnF; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=tOk6EJwq; spf=pass (imf09.hostedemail.com: domain of vbabka@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none Received: from imap1.dmz-prg2.suse.org (unknown [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-out1.suse.de (Postfix) with ESMTPS id BBF422118F; Mon, 16 Jun 2025 14:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1750083045; 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=gvIC/uuDHCtY1vVb5K1eQEc7EXM23z+t5pvf9m+AhSQ=; b=cLrKKGdfazuK4Qsukb+W30iaMebUpZwmGcHBCODU8QlPw2sGSsAGCWuCP1j/u4IDPpF2ET OK05y/aNcjg1kQTGXig6zW1VXgNvQZjQU98gqo/c2b94ojdV5Zqhlr1FPpBqKU0qDUr5/r 0ZBtHGHlaNToPDVcFSjsjmkpIP7Oi4U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1750083045; 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=gvIC/uuDHCtY1vVb5K1eQEc7EXM23z+t5pvf9m+AhSQ=; b=dny4tXlS0p6cvIpZ3qa22iOHOnwh/W933JFxtg1ZB+XpFFp1lApUVb+aC7FQhwZ/9HvcsI A7Q4iQejoxV4OXDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1750083040; 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=gvIC/uuDHCtY1vVb5K1eQEc7EXM23z+t5pvf9m+AhSQ=; b=g3VRNMnFsV2vpdwTe3cGuOXifgTf2FfpdE1rZIRFPWSL3GI5QjO++smsP4a7JNEl5523nL MenhZkK0wh7D3vkWSKzAbsy9yl8JJf/vUE+W0iMvnEoZEC6BVTAQFbvIxL6lWjo8WSQQ29 Q/7yL3lzmi0BN1fb6MqRzT3/RMAPbUY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1750083040; 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=gvIC/uuDHCtY1vVb5K1eQEc7EXM23z+t5pvf9m+AhSQ=; b=tOk6EJwqEhGC67oaMTTzj0WMn9JCX+ZBx3ZaIpb2DuC1HJE2OP1fOcZ9/QLj4zBlzg3H68 hEDgeLSCNHZgYNDg== 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 A747A13A6D; Mon, 16 Jun 2025 14:10:40 +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 7r6UKOAlUGjxTAAAD6G6ig (envelope-from ); Mon, 16 Jun 2025 14:10:40 +0000 Message-ID: <830729b1-dbe8-4569-89fb-4ada13ec7bc2@suse.cz> Date: Mon, 16 Jun 2025 16:11:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 11/11] mm,memory_hotplug: Drop status_change_nid parameter from memory_notify To: Oscar Salvador , Andrew Morton Cc: David Hildenbrand , Jonathan Cameron , Harry Yoo , Rakie Kim , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20250616135158.450136-1-osalvador@suse.de> <20250616135158.450136-12-osalvador@suse.de> From: Vlastimil Babka Content-Language: en-US In-Reply-To: <20250616135158.450136-12-osalvador@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 371B8140015 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1kGLLuPvgrSNSTexzVq6oyZvcv3LAro5nO4oxUEgK0UWvCynlgB/GousWSavzA1ktA3Nw/apcuuLD1AHNpfhP2MwblmHTwCLfqrw3tD8l+s1mgtLHkZSPndEejCFejWQ+2gwZYj6L0KroGgpmE+UKkgw2DG1BcdBTwrVpnAvy6Nk8UPETSeC43VHfBOQIt8NpFphgL8Dgp3hkuw79Y5nazJS0GdKNN+EQxlomZc8Qikeq2NS+aT15/73Wt/S5nac7P3ty49ZaY1cJq/eXa6q7p4khq0+PnnFvuC+zqsCvdIb+QQK77aeNCjM5rB63HwSB8g7vc06SJzJRMMTzVSBHPrxj7cgEV0Y1r21XQuW43q2zUN4Mnj5K32NPhnyDeylnjPKBqEjYQZIa1+VT8yAw8YCrLmhkTiNCqcRc9tQhfOPJx9iN8zunqFJaw25oD1LTyjMX46A1oBgRJVs= 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 6/16/25 3:51 PM, Oscar Salvador wrote: > There no users left of status_change_nid, so drop it from memory_notify > struct. > > Suggested-by: David Hildenbrand > Signed-off-by: Oscar Salvador > Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka > --- > Documentation/core-api/memory-hotplug.rst | 7 ------- > include/linux/memory.h | 1 - > mm/memory_hotplug.c | 4 ---- > 3 files changed, 12 deletions(-) > > diff --git a/Documentation/core-api/memory-hotplug.rst b/Documentation/core-api/memory-hotplug.rst > index fb84e78968b2..8fc97c2379de 100644 > --- a/Documentation/core-api/memory-hotplug.rst > +++ b/Documentation/core-api/memory-hotplug.rst > @@ -59,17 +59,10 @@ The third argument (arg) passes a pointer of struct memory_notify:: > struct memory_notify { > unsigned long start_pfn; > unsigned long nr_pages; > - int status_change_nid; > } > > - start_pfn is start_pfn of online/offline memory. > - nr_pages is # of pages of online/offline memory. > -- status_change_nid is set node id when N_MEMORY of nodemask is (will be) > - set/clear. It means a new(memoryless) node gets new memory by online and a > - node loses all memory. If this is -1, then nodemask status is not changed. > - > - If status_changed_nid* >= 0, callback should create/discard structures for the > - node if necessary. > > It is possible to get notified for MEM_CANCEL_ONLINE without having been notified > for MEM_GOING_ONLINE, and the same applies to MEM_CANCEL_OFFLINE and > diff --git a/include/linux/memory.h b/include/linux/memory.h > index a9ccd6579422..de8b898ada3f 100644 > --- a/include/linux/memory.h > +++ b/include/linux/memory.h > @@ -109,7 +109,6 @@ struct memory_notify { > unsigned long altmap_nr_pages; > unsigned long start_pfn; > unsigned long nr_pages; > - int status_change_nid; > }; > > struct notifier_block; > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index e8ccfe4cada2..bfaa570c0685 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -1153,7 +1153,6 @@ int online_pages(unsigned long pfn, unsigned long nr_pages, > struct memory_notify mem_arg = { > .start_pfn = pfn, > .nr_pages = nr_pages, > - .status_change_nid = NUMA_NO_NODE, > }; > struct node_notify node_arg = { > .nid = NUMA_NO_NODE, > @@ -1181,7 +1180,6 @@ int online_pages(unsigned long pfn, unsigned long nr_pages, > if (!node_state(nid, N_MEMORY)) { > /* Adding memory to the node for the first time */ > node_arg.nid = nid; > - mem_arg.status_change_nid = nid; > ret = node_notify(NODE_ADDING_FIRST_MEMORY, &node_arg); > ret = notifier_to_errno(ret); > if (ret) > @@ -1905,7 +1903,6 @@ int offline_pages(unsigned long start_pfn, unsigned long nr_pages, > struct memory_notify mem_arg = { > .start_pfn = start_pfn, > .nr_pages = nr_pages, > - .status_change_nid = NUMA_NO_NODE, > }; > struct node_notify node_arg = { > .nid = NUMA_NO_NODE, > @@ -1976,7 +1973,6 @@ int offline_pages(unsigned long start_pfn, unsigned long nr_pages, > */ > if (nr_pages >= pgdat->node_present_pages) { > node_arg.nid = node; > - mem_arg.status_change_nid = node; > ret = node_notify(NODE_REMOVING_LAST_MEMORY, &node_arg); > ret = notifier_to_errno(ret); > if (ret)