Nico Pache
835de37603
meminfo: add a per node counter for balloon drivers
Patch series "track memory used by balloon drivers", v2.
This series introduces a way to track memory used by balloon drivers.
Add a NR_BALLOON_PAGES counter to track how many pages are reclaimed by
the balloon drivers. First add the accounting, then updates the balloon
drivers (virtio, Hyper-V, VMware, Pseries-cmm, and Xen) to maintain this
counter. The virtio, Vmware, and pseries-cmm balloon drivers utilize the
balloon_compaction interface to allocate and free balloon pages. Other
balloon drivers will have to maintain this counter manually.
This makes the information visible in memory reporting interfaces like
/proc/meminfo, show_mem, and OOM reporting.
This provides admins visibility into their VM balloon sizes without
requiring different virtualization tooling. Furthermore, this information
is helpful when debugging an OOM inside a VM.
This patch (of 4):
Add NR_BALLOON_PAGES counter to track memory used by balloon drivers and
expose it through /proc/meminfo and other memory reporting interfaces.
[npache@redhat.com: document Balloon Meminfo entry]
Link: https://lkml.kernel.org/r/a0315ccf-f244-460e-8643-fd7388724fe5@redhat.com
Link: https://lkml.kernel.org/r/20250314213757.244258-1-npache@redhat.com
Link: https://lkml.kernel.org/r/20250314213757.244258-2-npache@redhat.com
Signed-off-by: Nico Pache <npache@redhat.com>
Cc: Alexander Atanasov <alexander.atanasov@virtuozzo.com>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: David Hildenbrand <david@redhat.com>
Cc: Dexuan Cui <decui@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Juegren Gross <jgross@suse.com>
Cc: Kanchana P Sridhar <kanchana.p.sridhar@intel.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Wei Liu <wei.liu@kernel.org>
Cc: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-03-21 22:03:13 -07:00
..
2025-01-30 09:13:35 -08:00
2024-10-08 14:41:53 +02:00
2025-02-26 15:20:57 +01:00
2025-02-21 15:06:29 -08:00
2024-10-28 13:16:56 +01:00
2025-03-16 22:05:53 -07:00
2024-09-18 11:44:43 +02:00
2024-08-07 11:33:21 +02:00
2025-03-07 11:17:30 -10:00
2025-01-28 13:48:37 +01:00
2025-01-31 10:30:34 -08:00
2025-01-30 09:13:35 -08:00
2024-11-14 07:45:20 +01:00
2024-07-15 11:14:59 -07:00
2025-01-27 19:25:23 -05:00
2025-01-30 08:22:31 +01:00
2025-01-28 13:48:37 +01:00
2024-12-19 13:11:24 -06:00
2025-01-27 19:25:23 -05:00
2025-02-27 11:27:49 +01:00
2024-10-15 15:58:36 +02:00
2025-02-07 10:27:25 +01:00
2025-03-05 21:53:20 +09:00
2024-11-15 11:34:57 +01:00
2024-09-16 09:14:02 +02:00
2025-03-17 22:06:38 -07:00
2025-01-27 20:58:58 -08:00
2025-01-27 19:25:24 -05:00
2024-11-06 10:42:06 +01:00
2025-03-17 22:06:41 -07:00
2025-02-07 10:27:25 +01:00
2025-01-30 09:13:35 -08:00
2024-11-18 09:35:30 -08:00
2025-01-31 09:33:54 -08:00
2024-10-08 14:41:53 +02:00
2025-03-17 22:06:58 -07:00
2025-03-16 22:06:22 -07:00
2024-12-05 13:52:37 +01:00
2025-01-22 19:55:08 -08:00
2024-12-05 12:31:40 +01:00
2025-01-27 19:25:23 -05:00
2025-02-01 15:07:56 -08:00
2025-01-28 13:48:37 +01:00
2024-08-07 11:33:36 +02:00
2025-02-13 16:00:48 +01:00
2025-03-08 14:34:06 -10:00
2025-01-21 11:34:43 -05:00
2025-02-10 13:11:24 -08:00
2025-02-01 03:53:26 -08:00
2024-10-02 17:23:23 -04:00
2025-02-07 10:27:26 +01:00
2024-12-30 11:37:40 +03:00
2025-03-16 22:06:22 -07:00
2024-08-07 11:33:21 +02:00
2025-01-31 09:40:31 -08:00
2025-02-19 18:06:53 +01:00
2025-03-21 22:03:13 -07:00
2025-01-20 13:37:14 -08:00
2024-12-03 10:40:36 +01:00
2025-01-28 13:48:37 +01:00
2024-08-21 22:32:58 +02:00
2025-03-02 22:50:54 -06:00
2025-03-16 17:40:24 -07:00
2025-01-09 10:43:58 +01:00
2024-08-07 11:33:36 +02:00
2024-07-22 18:25:47 -07:00
2025-01-27 19:25:23 -05:00
2025-01-18 15:31:35 +01:00
2025-03-16 22:06:22 -07:00
2024-11-12 19:02:12 -05:00
2024-12-11 14:11:23 -08:00
2025-02-07 10:27:24 +01:00
2025-01-28 13:48:37 +01:00
2025-03-17 22:06:38 -07:00
2024-10-02 12:02:15 -07:00
2025-01-28 13:48:37 +01:00
2025-01-27 19:25:45 -05:00
2024-10-10 10:20:51 +02:00
2024-12-02 11:25:09 +01:00
2024-12-11 17:45:18 +01:00
2024-12-11 17:45:18 +01:00
2025-01-10 08:49:05 -08:00
2025-01-20 13:27:58 -08:00
2024-08-07 11:26:54 -07:00
2025-03-16 22:06:22 -07:00
2024-10-22 11:16:57 +02:00
2024-10-17 18:38:49 +01:00
2025-02-24 10:51:57 -08:00
2025-03-17 22:06:41 -07:00
2025-02-07 09:22:31 -08:00
2024-08-19 13:45:02 +02:00
2024-07-24 20:59:29 +02:00
2024-11-03 01:28:06 -05:00
2025-01-28 13:48:37 +01:00
2025-01-28 13:48:37 +01:00
2024-12-09 11:34:29 +01:00
2024-12-17 09:16:11 +01:00
2025-02-07 10:27:27 +01:00
2025-01-20 09:40:49 -08:00
2024-12-22 11:29:52 +01:00
2024-12-21 01:36:17 -05:00
2024-11-13 14:08:34 +01:00
2024-11-03 01:28:06 -05:00
2025-01-28 13:48:37 +01:00
2024-11-18 14:54:10 -08:00
2024-11-03 01:28:06 -05:00
2025-03-16 22:06:27 -07:00
2024-11-03 01:28:06 -05:00
2025-01-30 09:13:35 -08:00
2025-01-28 13:48:37 +01:00
2024-10-21 16:29:38 +02:00
2024-09-24 15:29:42 -07:00
2025-01-09 16:58:54 +01:00
2024-10-28 13:26:54 +01:00
2025-02-20 15:48:17 +01:00
2025-02-07 10:27:26 +01:00
2025-02-24 11:30:35 +01:00
2025-02-07 10:27:26 +01:00
2025-02-24 11:27:02 +01:00
2025-03-06 18:25:35 -10:00
2024-12-22 11:29:52 +01:00
2024-10-22 11:16:59 +02:00
2024-06-28 14:36:43 +02:00
2024-11-18 12:24:06 -08:00
2024-11-03 01:28:06 -05:00
2024-11-03 01:28:07 -05:00
2025-01-13 16:24:16 +01:00
2024-10-22 11:16:57 +02:00
2024-11-03 01:28:06 -05:00
2025-03-06 18:25:35 -10:00
2025-02-07 10:27:24 +01:00
2024-11-03 01:28:06 -05:00
2025-01-25 20:22:23 -08:00
2024-11-03 01:28:06 -05:00
2025-01-28 13:48:37 +01:00
2024-11-19 16:35:06 -08:00
2025-01-28 13:48:37 +01:00
2024-11-03 01:28:06 -05:00
2024-11-06 13:00:01 -05:00