From: Qiang Liu <[email protected]>

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.

Checkpatch --strict reports harmless alignment warnings inside TRACE_EVENT,
consistent with other trace event headers.

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


Reply via email to