[Devel] [PATCH vz7 v2 3/4] drivers: vmware: balloon report stats to mm core

Alexander Atanasov alexander.atanasov at virtuozzo.com
Mon Oct 17 14:57:10 MSK 2022


Propagate balloon stats to mm core.

https://jira.sw.ru/browse/PSBM-142436
Signed-off-by: Alexander Atanasov <alexander.atanasov at virtuozzo.com>
---
 drivers/misc/vmw_balloon.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
index 981f47f400ae..0b0b634221cd 100644
--- a/drivers/misc/vmw_balloon.c
+++ b/drivers/misc/vmw_balloon.c
@@ -43,6 +43,7 @@
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <asm/hypervisor.h>
+#include <linux/balloon_compaction.h>
 
 MODULE_AUTHOR("VMware, Inc.");
 MODULE_DESCRIPTION("VMware Memory Control (Balloon) Driver");
@@ -1054,6 +1055,8 @@ static void vmballoon_work(struct work_struct *work)
 		else if (target == 0 ||
 				b->size > target + vmballoon_page_size(true))
 			vmballoon_deflate(b);
+		balloon_set_inflated_free(b->size << 2);
+
 	}
 
 	/*
-- 
2.31.1



More information about the Devel mailing list