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. --- 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/[email protected]/ --- 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
