linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/5] track memory used by balloon drivers
@ 2025-03-12  0:06 Nico Pache
  2025-03-12  0:06 ` [RFC 1/5] meminfo: add a per node counter for " Nico Pache
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Nico Pache @ 2025-03-12  0:06 UTC (permalink / raw)
  To: linux-hyperv, linux-kernel, virtualization, xen-devel,
	linux-fsdevel, linux-mm, cgroups
  Cc: kys, haiyangz, wei.liu, decui, jerrin.shaji-george,
	bcm-kernel-feedback-list, arnd, gregkh, mst, david, jasowang,
	xuanzhuo, eperezma, jgross, sstabellini, oleksandr_tyshchenko,
	akpm, hannes, mhocko, roman.gushchin, shakeel.butt, muchun.song,
	nphamcs, yosry.ahmed, kanchana.p.sridhar, alexander.atanasov

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, and Xen) to maintain this counter.

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.

Tested: virtio_balloon, run stress-ng, inflate balloon, oom prints
Signed-off-by: Nico Pache <npache@redhat.com>

Nico Pache (5):
  meminfo: add a per node counter for balloon drivers
  virtio_balloon: update the NR_BALLOON_PAGES state
  hv_balloon: update the NR_BALLOON_PAGES state
  vmx_balloon: update the NR_BALLOON_PAGES state
  xen: balloon: update the NR_BALLOON_PAGES state

 drivers/hv/hv_balloon.c         | 2 ++
 drivers/misc/vmw_balloon.c      | 5 ++++-
 drivers/virtio/virtio_balloon.c | 4 ++++
 drivers/xen/balloon.c           | 4 ++++
 fs/proc/meminfo.c               | 2 ++
 include/linux/mmzone.h          | 1 +
 mm/memcontrol.c                 | 1 +
 mm/show_mem.c                   | 4 +++-
 mm/vmstat.c                     | 1 +
 9 files changed, 22 insertions(+), 2 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2025-03-13 22:33 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12  0:06 [RFC 0/5] track memory used by balloon drivers Nico Pache
2025-03-12  0:06 ` [RFC 1/5] meminfo: add a per node counter for " Nico Pache
2025-03-12  4:20   ` Shakeel Butt
2025-03-12 20:14     ` Nico Pache
2025-03-12 22:19   ` David Hildenbrand
2025-03-12 23:04     ` Nico Pache
2025-03-13  8:22       ` David Hildenbrand
2025-03-13 17:35         ` Nico Pache
2025-03-13 22:33           ` David Hildenbrand
2025-03-13  7:20     ` Michael S. Tsirkin
2025-03-13  8:17       ` David Hildenbrand
2025-03-12  0:06 ` [RFC 2/5] virtio_balloon: update the NR_BALLOON_PAGES state Nico Pache
2025-03-12  6:55   ` Michael S. Tsirkin
2025-03-12  0:06 ` [RFC 3/5] hv_balloon: " Nico Pache
2025-03-12  0:06 ` [RFC 4/5] vmx_balloon: " Nico Pache
2025-03-12  6:56   ` Michael S. Tsirkin
2025-03-12 20:11     ` Nico Pache
2025-03-12 20:57       ` Michael S. Tsirkin
2025-03-12 22:17       ` David Hildenbrand
2025-03-12  0:07 ` [RFC 5/5] xen: balloon: " Nico Pache

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).