[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/33] block/nvme: Trace nvme_poll_queue() per queue
From: |
Stefan Hajnoczi |
Subject: |
[PULL 07/33] block/nvme: Trace nvme_poll_queue() per queue |
Date: |
Wed, 4 Nov 2020 15:18:02 +0000 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
As we want to enable multiple queues, report the event
in each nvme_poll_queue() call, rather than once in
the callback calling nvme_poll_queues().
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20201029093306.1063879-6-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Eric Auger <eric.auger@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 361b5772b7..8d74401ae7 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -594,6 +594,7 @@ static bool nvme_poll_queue(NVMeQueuePair *q)
const size_t cqe_offset = q->cq.head * NVME_CQ_ENTRY_BYTES;
NvmeCqe *cqe = (NvmeCqe *)&q->cq.queue[cqe_offset];
+ trace_nvme_poll_queue(q->s, q->index);
/*
* Do an early check for completions. q->lock isn't needed because
* nvme_process_completion() only runs in the event loop thread and
@@ -684,7 +685,6 @@ static bool nvme_poll_cb(void *opaque)
BDRVNVMeState *s = container_of(e, BDRVNVMeState,
irq_notifier[MSIX_SHARED_IRQ_IDX]);
- trace_nvme_poll_cb(s);
return nvme_poll_queues(s);
}
diff --git a/block/trace-events b/block/trace-events
index b90b07b15f..86292f3312 100644
--- a/block/trace-events
+++ b/block/trace-events
@@ -145,7 +145,7 @@ nvme_complete_command(void *s, int index, int cid) "s %p
queue %d cid %d"
nvme_submit_command(void *s, int index, int cid) "s %p queue %d cid %d"
nvme_submit_command_raw(int c0, int c1, int c2, int c3, int c4, int c5, int
c6, int c7) "%02x %02x %02x %02x %02x %02x %02x %02x"
nvme_handle_event(void *s) "s %p"
-nvme_poll_cb(void *s) "s %p"
+nvme_poll_queue(void *s, unsigned q_index) "s %p q #%u"
nvme_prw_aligned(void *s, int is_write, uint64_t offset, uint64_t bytes, int
flags, int niov) "s %p is_write %d offset 0x%"PRIx64" bytes %"PRId64" flags %d
niov %d"
nvme_write_zeroes(void *s, uint64_t offset, uint64_t bytes, int flags) "s %p
offset 0x%"PRIx64" bytes %"PRId64" flags %d"
nvme_qiov_unaligned(const void *qiov, int n, void *base, size_t size, int
align) "qiov %p n %d base %p size 0x%zx align 0x%x"
--
2.28.0
- [PULL 00/33] Block patches, Stefan Hajnoczi, 2020/11/04
- [PULL 01/33] accel/kvm: add PIO ioeventfds only in case kvm_eventfds_allowed is true, Stefan Hajnoczi, 2020/11/04
- [PULL 02/33] softmmu/memory: fix memory_region_ioeventfd_equal(), Stefan Hajnoczi, 2020/11/04
- [PULL 03/33] MAINTAINERS: Cover "block/nvme.h" file, Stefan Hajnoczi, 2020/11/04
- [PULL 04/33] block/nvme: Use hex format to display offset in trace events, Stefan Hajnoczi, 2020/11/04
- [PULL 05/33] block/nvme: Report warning with warn_report(), Stefan Hajnoczi, 2020/11/04
- [PULL 06/33] block/nvme: Trace controller capabilities, Stefan Hajnoczi, 2020/11/04
- [PULL 07/33] block/nvme: Trace nvme_poll_queue() per queue,
Stefan Hajnoczi <=
- [PULL 08/33] block/nvme: Improve nvme_free_req_queue_wait() trace information, Stefan Hajnoczi, 2020/11/04
- [PULL 09/33] block/nvme: Trace queue pair creation/deletion, Stefan Hajnoczi, 2020/11/04
- [PULL 10/33] block/nvme: Move definitions before structure declarations, Stefan Hajnoczi, 2020/11/04
- [PULL 11/33] block/nvme: Use unsigned integer for queue counter/size, Stefan Hajnoczi, 2020/11/04
- [PULL 12/33] block/nvme: Make nvme_identify() return boolean indicating error, Stefan Hajnoczi, 2020/11/04
- [PULL 13/33] block/nvme: Make nvme_init_queue() return boolean indicating error, Stefan Hajnoczi, 2020/11/04
- [PULL 14/33] block/nvme: Introduce Completion Queue definitions, Stefan Hajnoczi, 2020/11/04
- [PULL 15/33] block/nvme: Use definitions instead of magic values in add_io_queue(), Stefan Hajnoczi, 2020/11/04
- [PULL 16/33] block/nvme: Correctly initialize Admin Queue Attributes, Stefan Hajnoczi, 2020/11/04
- [PULL 17/33] block/nvme: Simplify ADMIN queue access, Stefan Hajnoczi, 2020/11/04