Skip to contentSkip to conversation

vmw_balloon-remove-vmballoon_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: vmw_balloon: remove vmballoon_compaction_init()
has been removed from the -mm tree. Its filename was
vmw_balloon-remove-vmballoon_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: vmw_balloon: remove vmballoon_compaction_init()
Date: Tue, 20 Jan 2026 00:01:10 +0100

Now that there is not a lot of logic left, let's just inline setting up the migration function and drop all these excessive comments that are not really required (or true) anymore.

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

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]>

---

 drivers/misc/vmw_balloon.c |   30 +++++-------------------------
 1 file changed, 5 insertions(+), 25 deletions(-)
drivers/misc/vmw_balloon.c renamed from drivers/misc/vmw_balloon.c~vmw_balloon-remove-vmballoon_compaction_init +5 -25
@@ -1833,27 +1833,10 @@ out_unlock:
 	up_read(&b->conf_sem);
 	return ret;
 }
-
-/**
- * vmballoon_compaction_init() - initialized compaction for the balloon.
- *
- * @b: pointer to the balloon.
- *
- * If during the initialization a failure occurred, this function does not
- * perform cleanup. The caller must call vmballoon_compaction_deinit() in this
- * case.
- *
- * Return: zero on success or error code on failure.
- */
-static __init void vmballoon_compaction_init(struct vmballoon *b)
-{
-	b->b_dev_info.migratepage = vmballoon_migratepage;
-}
-
 #else /* CONFIG_BALLOON_COMPACTION */
-static inline void vmballoon_compaction_init(struct vmballoon *b)
-{
-}
+int vmballoon_migratepage(struct balloon_dev_info *b_dev_info,
+			  struct page *newpage, struct page *page,
+			  enum migrate_mode mode);
 #endif /* CONFIG_BALLOON_COMPACTION */
 
 static int __init vmballoon_init(void)
@@ -1873,12 +1856,9 @@ static int __init vmballoon_init(void)
 	if (error)
 		return error;
 
-	/*
-	 * Initialization of compaction must be done after the call to
-	 * balloon_devinfo_init() .
-	 */
 	balloon_devinfo_init(&balloon.b_dev_info);
-	vmballoon_compaction_init(&balloon);
+	if (IS_ENABLED(CONFIG_BALLOON_COMPACTION))
+		balloon.b_dev_info.migratepage = vmballoon_migratepage;
 
 	INIT_LIST_HEAD(&balloon.huge_pages);
 	spin_lock_init(&balloon.comm_lock);

_

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