qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 12/17] block/nvme: Simplify nvme_kick trace event


From: Stefan Hajnoczi
Subject: Re: [PATCH 12/17] block/nvme: Simplify nvme_kick trace event
Date: Fri, 26 Jun 2020 13:33:54 +0100

On Thu, Jun 25, 2020 at 08:48:33PM +0200, Philippe Mathieu-Daudé wrote:
> The queues are tied to the hardware, logging the block
> driver using them is irrelevant.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  block/nvme.c       | 2 +-
>  block/trace-events | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/block/nvme.c b/block/nvme.c
> index 1b7b23cea4..4d2f31a9b3 100644
> --- a/block/nvme.c
> +++ b/block/nvme.c
> @@ -249,7 +249,7 @@ static void nvme_kick(BDRVNVMeState *s, NVMeQueuePair *q)
>      if (s->plugged || !q->need_kick) {
>          return;
>      }
> -    trace_nvme_kick(s, q->index);
> +    trace_nvme_kick(q->index);
>      assert(!(q->sq.tail & 0xFF00));
>      /* Fence the write to submission queue entry before notifying the 
> device. */
>      smp_wmb();
> diff --git a/block/trace-events b/block/trace-events
> index 29dff8881c..f0c476110b 100644
> --- a/block/trace-events
> +++ b/block/trace-events
> @@ -154,7 +154,7 @@ vxhs_close(char *vdisk_guid) "Closing vdisk %s"
>  vxhs_get_creds(const char *cacert, const char *client_key, const char 
> *client_cert) "cacert %s, client_key %s, client_cert %s"
>  
>  # nvme.c
> -nvme_kick(void *s, int queue) "s %p queue %d"
> +nvme_kick(int queue) "queue %d"

BDRVNVMeState is included so it's possible to differentiate between
multiple nvme driver instances. Simply tracing the queue number is not
enough if you have multiple nvme driver instances.

I suggest leaving this change until there is a hardware state object
that can be traced instead of the BDRVNVMeState.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]