diff options
author | yupeng <yupeng0921@gmail.com> | 2018-12-18 17:59:53 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-12-19 08:35:36 +0100 |
commit | 604c01d567cb9ee7d19dc598272cb90ab6229a8a (patch) | |
tree | 896081abe12f6fd5b12c79515dbc2b08457dc6f3 /drivers/nvme/host/pci.c | |
parent | ff8519f9e91170cd24ed503aa77d144e71bd4d92 (diff) | |
download | lwn-604c01d567cb9ee7d19dc598272cb90ab6229a8a.tar.gz lwn-604c01d567cb9ee7d19dc598272cb90ab6229a8a.zip |
nvme-pci: trace SQ status on completions
Export the disk name, queue id, sq_head, sq_tail to a trace event in
completion handling.
Usage example:
cd /sys/kernel/debug/tracing/events/nvme/nvme_sq
echo 'disk=="nvme1n1"' > filter
echo 1 > enable
cat /sys/kernel/debug/tracing/trace_pipe
Signed-off-by: yupeng <yupeng0921@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Keith Busch <keith.busch@intel.com>
[hch: slight formatting tweaks, use standard nvme tracepoint
conventions]
Signed-off-by: Christoph Hellwig <hch@lst.de>
wip
Diffstat (limited to 'drivers/nvme/host/pci.c')
-rw-r--r-- | drivers/nvme/host/pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 452b28130380..5a0bf6a24d50 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -32,6 +32,7 @@ #include <linux/sed-opal.h> #include <linux/pci-p2pdma.h> +#include "trace.h" #include "nvme.h" #define SQ_SIZE(depth) (depth * sizeof(struct nvme_command)) @@ -1003,6 +1004,7 @@ static inline void nvme_handle_cqe(struct nvme_queue *nvmeq, u16 idx) } req = blk_mq_tag_to_rq(*nvmeq->tags, cqe->command_id); + trace_nvme_sq(req, cqe->sq_head, nvmeq->sq_tail); nvme_end_request(req, cqe->status, cqe->result); } |