Linux virtualization list
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add virtio_balloon operation tracepoints
@ 2026-10-30  8:33 liuqiangneo
  2026-10-30  8:33 ` [PATCH v2 1/3] virtio_balloon: add tracepoints for inflate and deflate operations liuqiangneo
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: liuqiangneo @ 2026-10-30  8:33 UTC (permalink / raw)
  To: Michael S . Tsirkin, David Hildenbrand
  Cc: Jason Wang, Eugenio Pérez, Xuan Zhuo, linux-kernel,
	virtualization, Qiang Liu

From: Qiang Liu <liuqiang@kylinos.cn>

When a guest does not react to balloon size requests as expected, or balloon
operations stall, guest-side balloon activity cannot be observed. Existing
feedback ("Out of puff" log and host memory stats) cannot be correlated with
specific requests or host latency.

This series adds tracepoints under "virtio_balloon":

1/3: config_change / inflate / deflate: log target size, applied pages and
final size to see partial balloon adjustments.
2/3: host_ack: measure tell_host() waiting latency with vq and PFN info to
distinguish host/guest latency.
3/3: free_page_hint / migrate: track host hint commands/outstanding blocks,
and balloon page migration including balloon_lock -EAGAIN aborts.

Tracepoints are inactive by default and add no production overhead.
Test by enabling events in tracefs, triggering balloon resize, compaction
or live migration, then reading trace_pipe. Verified on QEMU/KVM.

---
v1->v2:
- Patch3: Trace vb->cmd_id_active directly to match the cmd sent to host;
- Rename outstanding_blocks to unreclaimed_blocks and fix its description;
- Wrap virtio_balloon_migrate tracepoint under CONFIG_BALLOON_MIGRATION to
  kill unused-tracepoint warnings.

Link to v1:
https://lore.kernel.org/all/20261030025834.19160-1-liuqiangneo@163.com/
---

Qiang Liu (3):
  virtio_balloon: add tracepoints for inflate and deflate operations
  virtio_balloon: add tracepoint for host ack latency
  virtio_balloon: add tracepoints for free page hinting and migration

 MAINTAINERS                           |   1 +
 drivers/virtio/virtio_balloon.c       |  43 ++++++-
 include/trace/events/virtio_balloon.h | 157 ++++++++++++++++++++++++++
 3 files changed, 198 insertions(+), 3 deletions(-)
 create mode 100644 include/trace/events/virtio_balloon.h

-- 
2.43.0


No virus found
		Checked by Hillstone Network AntiVirus


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

end of thread, other threads:[~2026-10-30  8:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30  8:33 [PATCH v2 0/3] Add virtio_balloon operation tracepoints liuqiangneo
2026-10-30  8:33 ` [PATCH v2 1/3] virtio_balloon: add tracepoints for inflate and deflate operations liuqiangneo
2026-10-30  8:38   ` sashiko-bot
2026-10-30  8:33 ` [PATCH v2 2/3] virtio_balloon: add tracepoint for host ack latency liuqiangneo
2026-10-30  8:37   ` sashiko-bot
2026-10-30  8:34 ` [PATCH v2 3/3] virtio_balloon: add tracepoints for free page hinting and migration liuqiangneo
2026-10-30  8:38   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox