[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250312000700.184573-1-npache@redhat.com>
Date: Tue, 11 Mar 2025 18:06:55 -0600
From: Nico Pache <npache@...hat.com>
To: linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org,
virtualization@...ts.linux.dev,
xen-devel@...ts.xenproject.org,
linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org,
cgroups@...r.kernel.org
Cc: kys@...rosoft.com,
haiyangz@...rosoft.com,
wei.liu@...nel.org,
decui@...rosoft.com,
jerrin.shaji-george@...adcom.com,
bcm-kernel-feedback-list@...adcom.com,
arnd@...db.de,
gregkh@...uxfoundation.org,
mst@...hat.com,
david@...hat.com,
jasowang@...hat.com,
xuanzhuo@...ux.alibaba.com,
eperezma@...hat.com,
jgross@...e.com,
sstabellini@...nel.org,
oleksandr_tyshchenko@...m.com,
akpm@...ux-foundation.org,
hannes@...xchg.org,
mhocko@...nel.org,
roman.gushchin@...ux.dev,
shakeel.butt@...ux.dev,
muchun.song@...ux.dev,
nphamcs@...il.com,
yosry.ahmed@...ux.dev,
kanchana.p.sridhar@...el.com,
alexander.atanasov@...tuozzo.com
Subject: [RFC 0/5] 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, 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@...hat.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
Powered by blists - more mailing lists