Skip to contentSkip to conversation

mm-demotion-build-demotion-targets-based-on-explicit-memory-tiers.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 27, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/demotion: build demotion targets based on explicit memory tiers
has been removed from the -mm tree. Its filename was
mm-demotion-build-demotion-targets-based-on-explicit-memory-tiers.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Aneesh Kumar K.V" <[email protected]>
Subject: mm/demotion: build demotion targets based on explicit memory tiers
Date: Thu, 18 Aug 2022 18:40:37 +0530

This patch switch the demotion target building logic to use memory tiers instead of NUMA distance. All N_MEMORY NUMA nodes will be placed in the default memory tier and additional memory tiers will be added by drivers like dax kmem.

This patch builds the demotion target for a NUMA node by looking at all memory tiers below the tier to which the NUMA node belongs. The closest node in the immediately following memory tier is used as a demotion target.

Since we are now only building demotion target for N_MEMORY NUMA nodes the CPU hotplug calls are removed in this patch.

Cc Alistair Popple <[email protected]>
Cc Bharata B Rao <[email protected]>
Cc Dan Williams <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Hesham Almatary <[email protected]>
Cc Jagdish Gediya <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Tim Chen <[email protected]>
Cc Yang Shi <[email protected]>
Cc SeongJae Park <[email protected]>

---

 include/linux/memory-tiers.h |   13 +
 include/linux/migrate.h      |   13 -
 mm/memory-tiers.c            |  238 ++++++++++++++++++-
 mm/migrate.c                 |  394 ---------------------------------
 mm/vmstat.c                  |    4 
 5 files changed, 239 insertions(+), 423 deletions(-)
include/linux/memory-tiers.h renamed from include/linux/memory-tiers.h~mm-demotion-build-demotion-targets-based-on-explicit-memory-tiers +13 -0
@@ -37,6 +37,14 @@ struct memory_dev_type *alloc_memory_typ
 void destroy_memory_type(struct memory_dev_type *memtype);
 void init_node_memory_type(int node, struct memory_dev_type *default_type);
 void clear_node_memory_type(int node, struct memory_dev_type *memtype);
+#ifdef CONFIG_MIGRATION
+int next_demotion_node(int node);
+#else
+static inline int next_demotion_node(int node)
+{
+	return NUMA_NO_NODE;
+}
+#endif
 
 #else
 
@@ -63,5 +71,10 @@ static inline void clear_node_memory_typ
 {
 
 }
+
+static inline int next_demotion_node(int node)
+{
+	return NUMA_NO_NODE;
+}
 #endif	/* CONFIG_NUMA */
 #endif  /* _LINUX_MEMORY_TIERS_H */
include/linux/migrate.h renamed from include/linux/migrate.h~mm-demotion-build-demotion-targets-based-on-explicit-memory-tiers +0 -13
@@ -100,19 +100,6 @@ static inline int migrate_huge_page_move
 
 #endif /* CONFIG_MIGRATION */
 
-#if defined(CONFIG_MIGRATION) && defined(CONFIG_NUMA)
-extern void set_migration_target_nodes(void);
-extern void migrate_on_reclaim_init(void);
-extern int next_demotion_node(int node);
-#else
-static inline void set_migration_target_nodes(void) {}
-static inline void migrate_on_reclaim_init(void) {}
-static inline int next_demotion_node(int node)
-{
-        return NUMA_NO_NODE;
-}
-#endif
-
 #ifdef CONFIG_COMPACTION
 bool PageMovable(struct page *page);
 void __SetPageMovable(struct page *page, const struct movable_operations *ops);
mm/memory-tiers.c renamed from mm/memory-tiers.c~mm-demotion-build-demotion-targets-based-on-explicit-memory-tiers +226 -12

296 lines not on this page · raw message

mm/migrate.c renamed from mm/migrate.c~mm-demotion-build-demotion-targets-based-on-explicit-memory-tiers +0 -394

398 lines not on this page · raw message

mm/vmstat.c renamed from mm/vmstat.c~mm-demotion-build-demotion-targets-based-on-explicit-memory-tiers +0 -4
@@ -28,7 +28,6 @@
 #include <linux/mm_inline.h>
 #include <linux/page_ext.h>
 #include <linux/page_owner.h>
-#include <linux/migrate.h>
 
 #include "internal.h"
 
@@ -2068,7 +2067,6 @@ static int vmstat_cpu_online(unsigned in
 
 	if (!node_state(cpu_to_node(cpu), N_CPU)) {
 		node_set_state(cpu_to_node(cpu), N_CPU);
-		set_migration_target_nodes();
 	}
 
 	return 0;
@@ -2093,7 +2091,6 @@ static int vmstat_cpu_dead(unsigned int
 		return 0;
 
 	node_clear_state(node, N_CPU);
-	set_migration_target_nodes();
 
 	return 0;
 }
@@ -2126,7 +2123,6 @@ void __init init_mm_internals(void)
 
 	start_shepherd_timer();
 #endif
-	migrate_on_reclaim_init();
 #ifdef CONFIG_PROC_FS
 	proc_create_seq("buddyinfo", 0444, NULL, &fragmentation_op);
 	proc_create_seq("pagetypeinfo", 0400, NULL, &pagetypeinfo_op);

_

Patches currently in -mm which might be from [email protected] are