[Devel] [PATCH RHEL9 COMMIT] drivers/vmware: Balloon report stats to mm core

Konstantin Khorenko khorenko at virtuozzo.com
Mon Oct 17 16:13:23 MSK 2022


The commit is pushed to "branch-rh9-5.14.0-70.22.1.vz9.17.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-70.22.1.vz9.17.7
------>
commit 47cfe6aaf736f583ba0ee1c0269da8236aa78deb
Author: Alexander Atanasov <alexander.atanasov at virtuozzo.com>
Date:   Mon Oct 17 14:52:53 2022 +0300

    drivers/vmware: Balloon report stats to mm core
    
    Propagate balloon stats to mm core.
    
    VMware balloon driver makes ballooned pages accounted as "used" in the
    guest OS, thus propagating the "InflatedFree" counter to mm.
    
    https://jira.sw.ru/browse/PSBM-142436
    Signed-off-by: Alexander Atanasov <alexander.atanasov at virtuozzo.com>
    
    Feature: balloon: usage information visible by guest
---
 drivers/misc/vmw_balloon.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
index f1d8ba6d4857..6e62fee0bfbe 100644
--- a/drivers/misc/vmw_balloon.c
+++ b/drivers/misc/vmw_balloon.c
@@ -1501,6 +1501,8 @@ static void vmballoon_work(struct work_struct *work)
 	}
 
 	up_read(&b->conf_sem);
+	if (change != 0)
+		balloon_set_inflated_free(atomic64_read(&b->size) << 2);
 
 	/*
 	 * We are using a freezable workqueue so that balloon operations are


More information about the Devel mailing list