Skip to contentSkip to conversation

mm-migrate-add-sysfs-interface-to-enable-reclaim-migration.patch removed from -mm tree

merged [email protected] 1 participant 1 message Sep 3, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/migrate: add sysfs interface to enable reclaim migration
has been removed from the -mm tree. Its filename was
mm-migrate-add-sysfs-interface-to-enable-reclaim-migration.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Huang Ying <[email protected]>
Subject: mm/migrate: add sysfs interface to enable reclaim migration

Some method is obviously needed to enable reclaim-based migration.

Just like traditional autonuma, there will be some workloads that will benefit like workloads with more "static" configurations where hot pages stay hot and cold pages stay cold. If pages come and go from the hot and cold sets, the benefits of this approach will be more limited.

The benefits are truly workload-based and *not* hardware-based. We do not believe that there is a viable threshold where certain hardware configurations should have this mechanism enabled while others do not.

To be conservative, earlier work defaulted to disable reclaim- based migration and did not include a mechanism to enable it. This proposes add a new sysfs file

/sys/kernel/mm/numa/demotion_enabled

as a method to enable it.

We are open to any alternative that allows end users to enable this mechanism or disable it if workload harm is detected (just like traditional autonuma).

Once this is enabled page demotion may move data to a NUMA node that does not fall into the cpuset of the allocating process. This could be construed to violate the guarantees of cpusets. However, since this is an opt-in mechanism, the assumption is that anyone enabling it is content to relax the guarantees.

---

 Documentation/ABI/testing/sysfs-kernel-mm-numa |   24 +++++
 include/linux/mempolicy.h                      |    4 
 mm/mempolicy.c                                 |   61 +++++++++++++++
 mm/vmscan.c                                    |    5 -
 4 files changed, 92 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-kernel-mm-numa new file +24 -0
@@ -0,0 +1,24 @@
+What:		/sys/kernel/mm/numa/
+Date:		June 2021
+Contact:	Linux memory management mailing list <[email protected]>
+Description:	Interface for NUMA
+
+What:		/sys/kernel/mm/numa/demotion_enabled
+Date:		June 2021
+Contact:	Linux memory management mailing list <[email protected]>
+Description:	Enable/disable demoting pages during reclaim
+
+		Page migration during reclaim is intended for systems
+		with tiered memory configurations.  These systems have
+		multiple types of memory with varied performance
+		characteristics instead of plain NUMA systems where
+		the same kind of memory is found at varied distances.
+		Allowing page migration during reclaim enables these
+		systems to migrate pages from fast tiers to slow tiers
+		when the fast tier is under pressure.  This migration
+		is performed before swap.  It may move data to a NUMA
+		node that does not fall into the cpuset of the
+		allocating process which might be construed to violate
+		the guarantees of cpusets.  This should not be enabled
+		on systems which need strict cpuset location
+		guarantees.
include/linux/mempolicy.h renamed from include/linux/mempolicy.h~mm-migrate-add-sysfs-interface-to-enable-reclaim-migration +4 -0
@@ -184,6 +184,8 @@ extern bool vma_migratable(struct vm_are
 extern int mpol_misplaced(struct page *, struct vm_area_struct *, unsigned long);
 extern void mpol_put_task_policy(struct task_struct *);
 
+extern bool numa_demotion_enabled;
+
 #else
 
 struct mempolicy {};
@@ -292,5 +294,7 @@ static inline nodemask_t *policy_nodemas
 {
 	return NULL;
 }
+
+#define numa_demotion_enabled	false
 #endif /* CONFIG_NUMA */
 #endif
mm/mempolicy.c renamed from mm/mempolicy.c~mm-migrate-add-sysfs-interface-to-enable-reclaim-migration +61 -0

64 lines not on this page · raw message

mm/vmscan.c renamed from mm/vmscan.c~mm-migrate-add-sysfs-interface-to-enable-reclaim-migration +3 -2
@@ -524,6 +524,8 @@ static long add_nr_deferred(long nr, str
 
 static bool can_demote(int nid, struct scan_control *sc)
 {
+	if (!numa_demotion_enabled)
+		return false;
 	if (sc) {
 		if (sc->no_demotion)
 			return false;
@@ -534,8 +536,7 @@ static bool can_demote(int nid, struct s
 	if (next_demotion_node(nid) == NUMA_NO_NODE)
 		return false;
 
-	// FIXME: actually enable this later in the series
-	return false;
+	return true;
 }
 
 static inline bool can_reclaim_anon_pages(struct mem_cgroup *memcg,

_

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