From: "Michael S. Tsirkin" <mst@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: sgarzare@redhat.com, raphael@enfabrica.net,
qemu-devel@nongnu.org, yc-core@yandex-team.ru,
d-tatianin@yandex-team.ru,
Raphael Norwitz <raphael.s.norwitz@gmail.com>
Subject: Re: [PATCH v3 23/23] vhost: add some useful trace-points
Date: Mon, 3 Nov 2025 16:26:12 -0500 [thread overview]
Message-ID: <20251103162429-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20251015145808.1112843-24-vsementsov@yandex-team.ru>
On Wed, Oct 15, 2025 at 05:58:07PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> Reviewed-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
> Reviewed-by: Raphael Norwitz <raphael.s.norwitz@gmail.com>
> ---
> hw/virtio/trace-events | 12 ++++++++++--
> hw/virtio/vhost.c | 20 ++++++++++++++++++--
> 2 files changed, 28 insertions(+), 4 deletions(-)
>
> diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events
> index aa1ffa5e94..c2529814f9 100644
> --- a/hw/virtio/trace-events
> +++ b/hw/virtio/trace-events
> @@ -9,8 +9,16 @@ vhost_section(const char *name) "%s"
> vhost_reject_section(const char *name, int d) "%s:%d"
> vhost_iotlb_miss(void *dev, int step) "%p step %d"
> vhost_dev_cleanup(void *dev) "%p"
> -vhost_dev_start(void *dev, const char *name, bool vrings) "%p:%s vrings:%d"
> -vhost_dev_stop(void *dev, const char *name, bool vrings) "%p:%s vrings:%d"
> +vhost_dev_start_in(void *dev, const char *name, bool vrings) "%p:%s vrings:%d"
> +vhost_dev_start_out(void *dev, const char *name) "%p:%s"
> +vhost_dev_stop_in(void *dev, const char *name, bool vrings) "%p:%s vrings:%d"
> +vhost_dev_stop_out(void *dev, const char *name) "%p:%s"
> +vhost_virtque_start_in(void *dev, const char *name, int idx) "%p:%s %d"
> +vhost_virtque_start_out(void *dev, const char *name, int idx) "%p:%s %d"
> +vhost_virtque_stop_in(void *dev, const char *name, int idx) "%p:%s %d"
> +vhost_virtque_stop_out(void *dev, const char *name, int idx) "%p:%s %d"
virtqueue_ not virtque_
> +vhost_dev_init_in(void *dev) "%p"
> +vhost_dev_init_out(void *dev) "%p"
>
>
> # vhost-user.c
> diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
> index fb5c4ba1ca..7ba90c24db 100644
> --- a/hw/virtio/vhost.c
> +++ b/hw/virtio/vhost.c
> @@ -1333,6 +1333,8 @@ int vhost_virtqueue_start(struct vhost_dev *dev,
> };
> struct VirtQueue *vvq = virtio_get_queue(vdev, idx);
>
> + trace_vhost_virtque_start_in(dev, vdev->name, idx);
> +
should be "virtqueue"
> r = vhost_vrings_map(dev, vdev, vq, idx);
> if (r <= 0) {
> return r;
> @@ -1394,6 +1396,8 @@ int vhost_virtqueue_start(struct vhost_dev *dev,
> }
> }
>
> + trace_vhost_virtque_start_out(dev, vdev->name, idx);
> +
same
> return 0;
>
> fail:
> @@ -1412,6 +1416,8 @@ static int do_vhost_virtqueue_stop(struct vhost_dev *dev,
> };
> int r = 0;
>
> + trace_vhost_virtque_stop_in(dev, vdev->name, idx);
> +
same
> if (virtio_queue_get_desc_addr(vdev, idx) == 0) {
> /* Don't stop the virtqueue which might have not been started */
> return 0;
> @@ -1445,6 +1451,8 @@ static int do_vhost_virtqueue_stop(struct vhost_dev *dev,
> }
>
> vhost_vrings_unmap(dev, vq, true);
> +
> + trace_vhost_virtque_stop_out(dev, vdev->name, idx);
same
> return r;
> }
>
> @@ -1616,6 +1624,8 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
> {
> int i, r, n_initialized_vqs = 0;
>
> + trace_vhost_dev_init_in(hdev);
> +
> hdev->vdev = NULL;
> hdev->migration_blocker = NULL;
>
> @@ -1700,6 +1710,8 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
> goto fail;
> }
>
> + trace_vhost_dev_init_out(hdev);
> +
> return 0;
>
> fail:
> @@ -2048,7 +2060,7 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev, bool vrings)
> /* should only be called after backend is connected */
> assert(hdev->vhost_ops);
>
> - trace_vhost_dev_start(hdev, vdev->name, vrings);
> + trace_vhost_dev_start_in(hdev, vdev->name, vrings);
>
> vdev->vhost_started = true;
> hdev->started = true;
> @@ -2133,6 +2145,8 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev, bool vrings)
> }
> }
> vhost_start_config_intr(hdev);
> +
> + trace_vhost_dev_start_out(hdev, vdev->name);
> return 0;
> fail_iotlb:
> if (vhost_dev_has_iommu(hdev) &&
> @@ -2182,7 +2196,7 @@ static int do_vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev,
> event_notifier_cleanup(
> &hdev->vqs[VHOST_QUEUE_NUM_CONFIG_INR].masked_config_notifier);
>
> - trace_vhost_dev_stop(hdev, vdev->name, vrings);
> + trace_vhost_dev_stop_in(hdev, vdev->name, vrings);
>
> if (hdev->vhost_ops->vhost_dev_start) {
> hdev->vhost_ops->vhost_dev_start(hdev, false);
> @@ -2212,6 +2226,8 @@ static int do_vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev,
> hdev->started = false;
> vdev->vhost_started = false;
> hdev->vdev = NULL;
> +
> + trace_vhost_dev_stop_out(hdev, vdev->name);
> return rc;
> }
>
> --
> 2.48.1
next prev parent reply other threads:[~2025-11-03 21:28 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 14:57 [PATCH v3 00/23] vhost refactoring and fixes Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 01/23] vhost-user: rework enabling vrings Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 02/23] vhost: drop backend_features field Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 03/23] vhost-user: introduce vhost_user_has_protocol_feature() helper Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 04/23] vhost: move protocol_features to vhost_user Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 05/23] vhost-user-gpu: drop code duplication Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 06/23] vhost: make vhost_dev.features private Vladimir Sementsov-Ogievskiy
2025-10-17 10:32 ` Daniil Tatianin
2025-10-17 17:02 ` Vladimir Sementsov-Ogievskiy
2025-10-31 17:31 ` Daniil Tatianin
2025-10-15 14:57 ` [PATCH v3 07/23] virtio: move common part of _set_guest_notifier to generic code Vladimir Sementsov-Ogievskiy
2025-11-07 13:01 ` Michael S. Tsirkin
2025-10-15 14:57 ` [PATCH v3 08/23] virtio: drop *_set_guest_notifier_fd_handler() helpers Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 09/23] vhost-user: keep QIOChannelSocket for backend channel Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 10/23] vhost: vhost_virtqueue_start(): fix failure path Vladimir Sementsov-Ogievskiy
2025-10-20 18:24 ` Raphael Norwitz
2025-10-15 14:57 ` [PATCH v3 11/23] vhost: make vhost_memory_unmap() null-safe Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 12/23] vhost: simplify calls to vhost_memory_unmap() Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 13/23] vhost: move vrings mapping to the top of vhost_virtqueue_start() Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 14/23] vhost: vhost_virtqueue_start(): drop extra local variables Vladimir Sementsov-Ogievskiy
2025-10-15 14:57 ` [PATCH v3 15/23] vhost: final refactoring of vhost vrings map/unmap Vladimir Sementsov-Ogievskiy
2025-10-15 14:58 ` [PATCH v3 16/23] vhost: simplify vhost_dev_init() error-path Vladimir Sementsov-Ogievskiy
2025-10-15 14:58 ` [PATCH v3 17/23] vhost: move busyloop timeout initialization to vhost_virtqueue_init() Vladimir Sementsov-Ogievskiy
2025-10-15 14:58 ` [PATCH v3 18/23] vhost: introduce check_memslots() helper Vladimir Sementsov-Ogievskiy
2025-11-03 22:19 ` Michael S. Tsirkin
2025-11-04 10:59 ` Vladimir Sementsov-Ogievskiy
2025-10-15 14:58 ` [PATCH v3 19/23] vhost: vhost_dev_init(): simplify features initialization Vladimir Sementsov-Ogievskiy
2025-10-15 14:58 ` [PATCH v3 20/23] hw/virtio/virtio-bus: refactor virtio_bus_set_host_notifier() Vladimir Sementsov-Ogievskiy
2025-10-15 14:58 ` [PATCH v3 21/23] vhost-user: make trace events more readable Vladimir Sementsov-Ogievskiy
2025-11-03 22:22 ` Michael S. Tsirkin
2025-10-15 14:58 ` [PATCH v3 22/23] vhost-user-blk: add some useful trace-points Vladimir Sementsov-Ogievskiy
2025-11-03 21:28 ` Michael S. Tsirkin
2025-11-04 11:08 ` Vladimir Sementsov-Ogievskiy
2025-10-15 14:58 ` [PATCH v3 23/23] vhost: " Vladimir Sementsov-Ogievskiy
2025-11-03 21:26 ` Michael S. Tsirkin [this message]
2025-10-18 15:33 ` [PATCH v3 00/23] vhost refactoring and fixes Lei Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251103162429-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=d-tatianin@yandex-team.ru \
--cc=qemu-devel@nongnu.org \
--cc=raphael.s.norwitz@gmail.com \
--cc=raphael@enfabrica.net \
--cc=sgarzare@redhat.com \
--cc=vsementsov@yandex-team.ru \
--cc=yc-core@yandex-team.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).