linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Oscar Salvador <osalvador@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@redhat.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Harry Yoo <harry.yoo@oracle.com>, Rakie Kim <rakie.kim@sk.com>,
	Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Oscar Salvador <osalvador@suse.de>
Subject: [PATCH v7 11/11] mm,memory_hotplug: Drop status_change_nid parameter from memory_notify
Date: Mon, 16 Jun 2025 15:51:54 +0200	[thread overview]
Message-ID: <20250616135158.450136-12-osalvador@suse.de> (raw)
In-Reply-To: <20250616135158.450136-1-osalvador@suse.de>

There no users left of status_change_nid, so drop it from memory_notify
struct.

Suggested-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Oscar Salvador <osalvador@suse.de>
Acked-by: David Hildenbrand <david@redhat.com>
---
 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)
-- 
2.49.0



  parent reply	other threads:[~2025-06-16 13:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16 13:51 [PATCH v7 00/11] Implement numa node notifier Oscar Salvador
2025-06-16 13:51 ` [PATCH v7 01/11] mm,slub: Do not special case N_NORMAL nodes for slab_nodes Oscar Salvador
2025-06-16 13:51 ` [PATCH v7 02/11] mm,memory_hotplug: Remove status_change_nid_normal and update documentation Oscar Salvador
2025-06-16 13:51 ` [PATCH v7 03/11] mm,memory_hotplug: Implement numa node notifier Oscar Salvador
2025-06-16 14:31   ` David Hildenbrand
2025-06-16 13:51 ` [PATCH v7 04/11] mm,slub: Use node-notifier instead of memory-notifier Oscar Salvador
2025-06-16 13:51 ` [PATCH v7 05/11] mm,memory-tiers: " Oscar Salvador
2025-06-16 13:51 ` [PATCH v7 06/11] drivers,cxl: " Oscar Salvador
2025-06-16 13:51 ` [PATCH v7 07/11] drivers,hmat: " Oscar Salvador
2025-06-16 13:51 ` [PATCH v7 08/11] kernel,cpuset: " Oscar Salvador
2025-06-16 13:51 ` [PATCH v7 09/11] mm,mempolicy: " Oscar Salvador
2025-06-17  0:14   ` Gregory Price
2025-06-16 13:51 ` [PATCH v7 10/11] mm,page_ext: Derive the node from the pfn Oscar Salvador
2025-06-16 13:51 ` Oscar Salvador [this message]
2025-06-16 14:11   ` [PATCH v7 11/11] mm,memory_hotplug: Drop status_change_nid parameter from memory_notify Vlastimil Babka
2025-06-16 14:32 ` [PATCH v7 00/11] Implement numa node notifier David Hildenbrand
2025-06-17  9:26   ` Oscar Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250616135158.450136-12-osalvador@suse.de \
    --to=osalvador@suse.de \
    --cc=42.hyeyoo@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=harry.yoo@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rakie.kim@sk.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox