Propagate inflated memory changes to mm.
Signed-off-by: Alexander Atanasov <[email protected]>
---
drivers/misc/vmw_balloon.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
index 91d4d2a285c5..ce581e3d101c 100644
--- a/drivers/misc/vmw_balloon.c
+++ b/drivers/misc/vmw_balloon.c
@@ -1161,6 +1161,8 @@ static void vmballoon_inflate(struct vmballoon *b)
cond_resched();
}
+ /* Update core after inflation is done - send a single notification */
+ balloon_set_inflated_free(atomic64_read(&b->size) << 2);
/*
* Release pages that were allocated while attempting to inflate the
@@ -1285,6 +1287,8 @@ static unsigned long vmballoon_deflate(struct vmballoon *b, uint64_t n_frames,
cond_resched();
}
+ /* Update core after deflation is done - send a single notification */
+ balloon_set_inflated_free(atomic64_read(&b->size) << 2);
return deflated_frames;
}
--
2.31.1