* [PATCH] mm/balloon: fix NR_BALLOON_PAGES accounting on migration failure
@ 2026-11-14 16:47 shao.mingyin
2026-11-14 17:31 ` Lorenzo Stoakes (ARM)
0 siblings, 1 reply; 2+ messages in thread
From: shao.mingyin @ 2026-11-14 16:47 UTC (permalink / raw)
To: akpm, david; +Cc: linux-mm, virtualization, linux-kernel
From: Shao Mingyin <shao.mingyin@zte.com.cn>
mm/balloon: fix NR_BALLOON_PAGES accounting on migration failure
A balloon driver's -ENOENT migration result means that the old page was
deflated but the replacement was not inflated. vmw_balloon returns this
when its deflate operation succeeds and the subsequent inflate fails.
balloon_page_migrate() accounts the deflation and frees the old page,
but does not decrement NR_BALLOON_PAGES. Each such failure therefore
leaves one extra page in the per-node count, which also contributes to
the Balloon value in /proc/meminfo.
Decrement the counter on the old page's node, matching normal dequeue
accounting.
Fixes: 4d689474e1b2 ("balloon_compaction: update the NR_BALLOON_PAGES state")
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
---
Build-tested mm/balloon.o with W=1 and CONFIG_BALLOON_MIGRATION=y on
x86_64. The vmw_balloon -ENOENT callback path was reviewed statically.
No VMware hardware or hypervisor runtime test was performed.
mm/balloon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/balloon.c b/mm/balloon.c
index 96a8f1e20bc66ae46a571a4f51243789bb362925..44c211ba8e6b0b86236ec0e05ca1eb4b9c444a8e 100644
--- a/mm/balloon.c
+++ b/mm/balloon.c
@@ -313,6 +313,7 @@ static int balloon_page_migrate(struct page *newpage, struct page *page,
} else {
/* Old page was deflated but new page not inflated. */
__count_vm_event(BALLOON_DEFLATE);
+ dec_node_page_state(page, NR_BALLOON_PAGES);
if (b_dev_info->adjust_managed_page_count)
adjust_managed_page_count(page, 1);
base-commit: 84abb955b1015477aa11a96e2f3ac1b938b77f48
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] mm/balloon: fix NR_BALLOON_PAGES accounting on migration failure 2026-11-14 16:47 [PATCH] mm/balloon: fix NR_BALLOON_PAGES accounting on migration failure shao.mingyin @ 2026-11-14 17:31 ` Lorenzo Stoakes (ARM) 0 siblings, 0 replies; 2+ messages in thread From: Lorenzo Stoakes (ARM) @ 2026-11-14 17:31 UTC (permalink / raw) To: shao.mingyin; +Cc: akpm, david, linux-mm, virtualization, linux-kernel On Sun, Nov 15, 2026 at 12:47:08AM +0800, shao.mingyin@zte.com.cn wrote: > From: Shao Mingyin <shao.mingyin@zte.com.cn> > > mm/balloon: fix NR_BALLOON_PAGES accounting on migration failure > > A balloon driver's -ENOENT migration result means that the old page was > deflated but the replacement was not inflated. vmw_balloon returns this > when its deflate operation succeeds and the subsequent inflate fails. > > balloon_page_migrate() accounts the deflation and frees the old page, > but does not decrement NR_BALLOON_PAGES. Each such failure therefore > leaves one extra page in the per-node count, which also contributes to > the Balloon value in /proc/meminfo. > > Decrement the counter on the old page's node, matching normal dequeue > accounting. > > Fixes: 4d689474e1b2 ("balloon_compaction: update the NR_BALLOON_PAGES state") > Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> NAK. this is generated by some AI slopper's script, spamming the kernel. The patches I looked at were wrong/broken, so no to anything from this person. They've sent 300 mails in under four weeks spanniing: ata, scsi, target, ufs, nvme/nvmet, ubifs, ublk, zloop, dm, md, mmc, virtio-blk, mfd, gpio, pwm, spi, PCI, ASoC, ACPI, net, vfs mount, block partitions, and now mm. and 17 series across 7 subsystems over the past 23 hours. We need a way to ban emails from people like this... -- Cheers, Lorenzo ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-14 17:32 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-14 16:47 [PATCH] mm/balloon: fix NR_BALLOON_PAGES accounting on migration failure shao.mingyin 2026-11-14 17:31 ` Lorenzo Stoakes (ARM)
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.