[RFC PATCH v5 6/8] drivers: vmware: balloon - report inflated memory

From: Alexander Atanasov
Date: Wed Oct 19 2022 - 08:10:46 EST


Update the inflated memory in the mm core on change.

Signed-off-by: Alexander Atanasov <alexander.atanasov@xxxxxxxxxxxxx>
---
drivers/misc/vmw_balloon.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
index 91d4d2a285c5..3bfd845898f5 100644
--- a/drivers/misc/vmw_balloon.c
+++ b/drivers/misc/vmw_balloon.c
@@ -1507,6 +1507,7 @@ static void vmballoon_work(struct work_struct *work)
queue_delayed_work(system_freezable_wq,
dwork, round_jiffies_relative(HZ));

+ balloon_set_inflated_free(atomic64_read(&b->size) << 2);
}

/**
--
2.31.1