Skip to contentSkip to conversation

powerpc-pseries-cmm-remove-cmm_balloon_compaction_init.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 31

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: powerpc/pseries/cmm: remove cmm_balloon_compaction_init()
has been removed from the -mm tree. Its filename was
powerpc-pseries-cmm-remove-cmm_balloon_compaction_init.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: "David Hildenbrand (Red Hat)" <[email protected]>
Subject: powerpc/pseries/cmm: remove cmm_balloon_compaction_init()
Date: Tue, 20 Jan 2026 00:01:11 +0100

Now that there is not a lot of logic left, let's just inline setting up the migration function.

To avoid #ifdef in the caller we can instead use IS_ENABLED() and make the compiler happy by only providing the function declaration.

Now that the function is gone, drop the "out_balloon_compaction" label. Note that before commit 68f2736a8583 ("mm: Convert all PageMovable users to movable_operations") we actually had to undo something, now not anymore.

Cc Arnd Bergmann <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc Eugenio Pérez <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Jason Wang <[email protected]>
Cc Jerrin Shaji George <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Liam Howlett <[email protected]>
Cc Madhavan Srinivasan <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc SeongJae Park <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Xuan Zhuo <[email protected]>
Cc Zi Yan <[email protected]>

---

 arch/powerpc/platforms/pseries/cmm.c |   16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)
arch/powerpc/platforms/pseries/cmm.c renamed from arch/powerpc/platforms/pseries/cmm.c~powerpc-pseries-cmm-remove-cmm_balloon_compaction_init +5 -11
@@ -548,15 +548,9 @@ static int cmm_migratepage(struct balloo
 
 	return 0;
 }
-
-static void cmm_balloon_compaction_init(void)
-{
-	b_dev_info.migratepage = cmm_migratepage;
-}
 #else /* CONFIG_BALLOON_COMPACTION */
-static void cmm_balloon_compaction_init(void)
-{
-}
+int cmm_migratepage(struct balloon_dev_info *b_dev_info, struct page *newpage,
+		    struct page *page, enum migrate_mode mode);
 #endif /* CONFIG_BALLOON_COMPACTION */
 
 /**
@@ -573,11 +567,12 @@ static int cmm_init(void)
 		return -EOPNOTSUPP;
 
 	balloon_devinfo_init(&b_dev_info);
-	cmm_balloon_compaction_init();
+	if (IS_ENABLED(CONFIG_BALLOON_COMPACTION))
+		b_dev_info.migratepage = cmm_migratepage;
 
 	rc = register_oom_notifier(&cmm_oom_nb);
 	if (rc < 0)
-		goto out_balloon_compaction;
+		return rc;
 
 	if ((rc = register_reboot_notifier(&cmm_reboot_nb)))
 		goto out_oom_notifier;
@@ -606,7 +601,6 @@ out_reboot_notifier:
 	unregister_reboot_notifier(&cmm_reboot_nb);
 out_oom_notifier:
 	unregister_oom_notifier(&cmm_oom_nb);
-out_balloon_compaction:
 	return rc;
 }
 

_

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

mm-move-pte-table-reclaim-code-to-memoryc.patch mm-memory-handle-non-split-locks-correctly-in-zap_empty_pte_table.patch