[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.
signature.asc
Description: PGP signature
- Re: [PATCH 07/17] block/nvme: Move code around, (continued)
- [PATCH 08/17] block/nvme: Use correct type void*, Philippe Mathieu-Daudé, 2020/06/25
- [PATCH 09/17] block/nvme: Remove unused argument from nvme_free_queue_pair(), Philippe Mathieu-Daudé, 2020/06/25
- [PATCH 10/17] block/nvme: Simplify nvme_init_queue() arguments, Philippe Mathieu-Daudé, 2020/06/25
- [PATCH 11/17] block/nvme: Simplify nvme_create_queue_pair() arguments, Philippe Mathieu-Daudé, 2020/06/25
- [PATCH 12/17] block/nvme: Simplify nvme_kick trace event, Philippe Mathieu-Daudé, 2020/06/25
- Re: [PATCH 12/17] block/nvme: Simplify nvme_kick trace event,
Stefan Hajnoczi <=
- [PATCH 13/17] block/nvme: Simplify completion trace events, Philippe Mathieu-Daudé, 2020/06/25
- [PATCH 14/17] block/nvme: Replace BDRV_POLL_WHILE by AIO_WAIT_WHILE, Philippe Mathieu-Daudé, 2020/06/25
- [PATCH 16/17] block/nvme: Check BDRVNVMeState::plugged out of nvme_kick(), Philippe Mathieu-Daudé, 2020/06/25
- [RFC PATCH 15/17] block/nvme: Use per-queue AIO context, Philippe Mathieu-Daudé, 2020/06/25
- [PATCH 17/17] block/nvme: Check BDRVNVMeState::plugged out of nvme_process_completion, Philippe Mathieu-Daudé, 2020/06/25