Skip to content

track memory used by balloon drivers

Nico Pache linux-fsdevel linux-hyperv linux-mm lkml virtualization xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 4 repliesIn review 3 of 4 applied
  2. v1 RFC5 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- Add counter to the balloon_compaction interface
- Dropped patches for virtio and VMware as they use balloon_compaction interface

Patches in v2 3 of 4 applied

#Subject and filesSizeRepliesApplied
1/4meminfo: add a per node counter for balloon driversfs/proc/meminfo.c include/linux/mmzone.h mm/show_mem.c +1 more+7 -12 replies
2/4balloon_compaction: update the NR_BALLOON_PAGES statemm/balloon_compaction.c+2 -00 repliesApplied
3/4hv_balloon: update the NR_BALLOON_PAGES statedrivers/hv/hv_balloon.c+2 -01 replyApplied
4/4xen: balloon: update the NR_BALLOON_PAGES statedrivers/xen/balloon.c+4 -01 replyApplied

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchMichael KelleyJuergen Gross
1/4
2/4
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] track memory used by balloon drivers

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.

V2 changes:
- Add counter to the balloon_compaction interface
- Dropped patches for virtio and VMware as they use balloon_compaction interface

Tested: virtio_balloon, run stress-ng, inflate balloon, oom prints

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

 drivers/hv/hv_balloon.c | 2 ++
 drivers/xen/balloon.c   | 4 ++++
 fs/proc/meminfo.c       | 2 ++
 include/linux/mmzone.h  | 1 +
 mm/balloon_compaction.c | 2 ++
 mm/show_mem.c           | 4 +++-
 mm/vmstat.c             | 1 +
 7 files changed, 15 insertions(+), 1 deletion(-)
Signature · 1 line
2.48.1