From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [RFC PATCH V7 0/7] nvme-trace: Add support for fabrics command
Date: Fri, 7 Jun 2019 04:45:05 +0900 [thread overview]
Message-ID: <20190606194512.11020-1-minwoo.im.dev@gmail.com> (raw)
Hi,
This is 7th series to support for commands tracing in host and target-side
for not only admin and nvm commands, but also fabrics commands.
This series has been applied suggestion points from Christoph, and it
has added patches for host-side which has exactly the same things with
the target-side as we discussed.
This series has been tested with the target backed loop device, and the
target with RDMA.
Example (RDMA):
1) target-side
kworker/0:2-1844 [000] .... 65.451612: nvmet_req_init: nvmet_: qid=0, cmdid=0 cmd=(nvme_fabrics_type_connect, recfmt=0, qid=0, sqsize=31, cattr=0, kato=15000)
kworker/0:1H-1056 [000] .... 65.454270: nvmet_req_complete: nvmet1: qid=0, cmdid=0, res=0xffff888000000001, status=0x0
kworker/0:1H-1056 [000] .... 65.456356: nvmet_req_init: nvmet1: qid=0, cmdid=6 cmd=(nvme_fabrics_type_property_get, attrib=1, ofst=0x0)
kworker/0:1H-1056 [000] .... 65.456663: nvmet_req_complete: nvmet1: qid=0, cmdid=6, res=0x200f0003ff, status=0x0
kworker/0:1H-1056 [000] .... 65.459008: nvmet_req_init: nvmet1: qid=0, cmdid=7 cmd=(nvme_fabrics_type_property_set, attrib=0, ofst=0x14, value=0x460001)
kworker/0:1H-1056 [000] .... 65.459101: nvmet_req_complete: nvmet1: qid=0, cmdid=7, res=0xffff88807ac61420, status=0x0
kworker/0:1H-1056 [000] .... 65.461032: nvmet_req_init: nvmet1: qid=0, cmdid=8 cmd=(nvme_fabrics_type_property_get, attrib=0, ofst=0x1c)
kworker/0:1H-1056 [000] .... 65.461118: nvmet_req_complete: nvmet1: qid=0, cmdid=8, res=0x1, status=0x0
kworker/0:1H-1056 [000] .... 65.462977: nvmet_req_init: nvmet1: qid=0, cmdid=9 cmd=(nvme_fabrics_type_property_get, attrib=0, ofst=0x8)
kworker/0:1H-1056 [000] .... 65.463087: nvmet_req_complete: nvmet1: qid=0, cmdid=9, res=0x10300, status=0x0
kworker/0:1H-1056 [000] .... 65.465135: nvmet_req_init: nvmet1: qid=0, cmdid=6 cmd=(nvme_fabrics_type_property_get, attrib=1, ofst=0x0)
kworker/0:1H-1056 [000] .... 65.465234: nvmet_req_complete: nvmet1: qid=0, cmdid=6, res=0x200f0003ff, status=0x0
...
kworker/0:1H-1056 [000] .... 65.569340: nvmet_req_init: nvmet1: disk=/dev/nvme0n1, qid=6, cmdid=49, nsid=0x1, flags=0x40, meta=0x0 cmd=(nvme_cmd_read, slba=0, len=7, ctrl=0x0, dsmgmt=0, reftag=0)
<idle>-0 [000] d.h. 65.570140: nvmet_req_complete: nvmet1: disk=/dev/nvme0n1, qid=6, cmdid=49, res=0xffff88807a3b8b90, status=0x0
kworker/0:1H-1056 [000] .... 65.573208: nvmet_req_init: nvmet1: disk=/dev/nvme0n1, qid=6, cmdid=50, nsid=0x1, flags=0x40, meta=0x0 cmd=(nvme_cmd_read, slba=8, len=7, ctrl=0x0, dsmgmt=0, reftag=0)
<idle>-0 [000] d.H. 65.573790: nvmet_req_complete: nvmet1: disk=/dev/nvme0n1, qid=6, cmdid=50, res=0xffff88807a3b8ba0, status=0x0
kworker/0:1H-1056 [000] .... 65.585858: nvmet_req_init: nvmet1: disk=/dev/nvme0n1, qid=3, cmdid=1, nsid=0x1, flags=0x40, meta=0x0 cmd=(nvme_cmd_read, slba=1048448, len=7, ctrl=0x8000, dsmgmt=7, reftag=0)
<idle>-0 [000] d.h. 65.586238: nvmet_req_complete: nvmet1: disk=/dev/nvme0n1, qid=3, cmdid=1, res=0xffff88807c9e95c0, status=0x0
kworker/0:1H-1056 [000] .... 65.587726: nvmet_req_init: nvmet1: disk=/dev/nvme0n1, qid=3, cmdid=2, nsid=0x1, flags=0x40, meta=0x0 cmd=(nvme_cmd_read, slba=1048560, len=7, ctrl=0x8000, dsmgmt=7, reftag=0)
<idle>-0 [000] d.h. 65.587982: nvmet_req_complete: nvmet1: disk=/dev/nvme0n1, qid=3, cmdid=2, res=0xffff88807c9e95d0, status=0x0
2) host-side
nvme-2318 [007] .... 64.668667: nvme_setup_cmd: nvme0: qid=0, cmdid=0 cmd=(nvme_fabrics_type_connect recfmt=0, qid=0, sqsize=31, cattr=0, kato=15000)
<idle>-0 [007] ..s. 64.673720: nvme_complete_rq: nvme0: qid=0, cmdid=0, res=0xffff888000000001, retries=0, flags=0x0, status=0x0
nvme-2318 [007] .... 64.673882: nvme_setup_cmd: nvme0: qid=0, cmdid=6 cmd=(nvme_fabrics_type_property_get attrib=1, ofst=0x0)
<idle>-0 [007] ..s. 64.676172: nvme_complete_rq: nvme0: qid=0, cmdid=6, res=0x200f0003ff, retries=0, flags=0x0, status=0x0
nvme-2318 [007] .... 64.676306: nvme_setup_cmd: nvme0: qid=0, cmdid=7 cmd=(nvme_fabrics_type_property_set attrib=0, ofst=0x14, value=0x460001)
<idle>-0 [007] ..s. 64.678340: nvme_complete_rq: nvme0: qid=0, cmdid=7, res=0xffff88807ac61420, retries=0, flags=0x0, status=0x0
nvme-2318 [007] .... 64.678363: nvme_setup_cmd: nvme0: qid=0, cmdid=8 cmd=(nvme_fabrics_type_property_get attrib=0, ofst=0x1c)
<idle>-0 [007] ..s. 64.680215: nvme_complete_rq: nvme0: qid=0, cmdid=8, res=0x1, retries=0, flags=0x0, status=0x0
nvme-2318 [007] .... 64.680240: nvme_setup_cmd: nvme0: qid=0, cmdid=9 cmd=(nvme_fabrics_type_property_get attrib=0, ofst=0x8)
<idle>-0 [007] ..s. 64.682335: nvme_complete_rq: nvme0: qid=0, cmdid=9, res=0x10300, retries=0, flags=0x0, status=0x0
nvme-2318 [007] .... 64.682474: nvme_setup_cmd: nvme0: qid=0, cmdid=6 cmd=(nvme_fabrics_type_property_get attrib=1, ofst=0x0)
<idle>-0 [007] ..s. 64.684448: nvme_complete_rq: nvme0: qid=0, cmdid=6, res=0x200f0003ff, retries=0, flags=0x0, status=0x0
...
worker/u18:2-1945 [005] .... 64.786215: nvme_setup_cmd: nvme0: disk=nvme0c0n1, qid=6, cmdid=49, nsid=0x1, flags=0x40, meta=0x0 cmd=(nvme_cmd_read slba=0, len=7, ctrl=0x0, dsmgmt=0, reftag=0)
<idle>-0 [005] d.h. 64.790116: nvme_complete_rq: nvme0: disk=nvme0c0n1, qid=6, cmdid=49, res=0xffff88807a3b8b90, retries=0, flags=0x0, status=0x0
worker/u18:2-1945 [005] .... 64.790287: nvme_setup_cmd: nvme0: disk=nvme0c0n1, qid=6, cmdid=50, nsid=0x1, flags=0x40, meta=0x0 cmd=(nvme_cmd_read slba=8, len=7, ctrl=0x0, dsmgmt=0, reftag=0)
<idle>-0 [005] d.h. 64.794233: nvme_complete_rq: nvme0: disk=nvme0c0n1, qid=6, cmdid=50, res=0xffff88807a3b8ba0, retries=0, flags=0x0, status=0x0
ystemd-udevd-2328 [002] .... 64.803350: nvme_setup_cmd: nvme0: disk=nvme0c0n1, qid=3, cmdid=1, nsid=0x1, flags=0x40, meta=0x0 cmd=(nvme_cmd_read slba=1048448, len=7, ctrl=0x8000, dsmgmt=7, reftag=0)
<idle>-0 [000] ..s. 64.805254: nvme_complete_rq: nvme0: disk=nvme0c0n1, qid=3, cmdid=1, res=0xffff88807c9e95c0, retries=0, flags=0x0, status=0x0
ystemd-udevd-2328 [002] .... 64.805389: nvme_setup_cmd: nvme0: disk=nvme0c0n1, qid=3, cmdid=2, nsid=0x1, flags=0x0, meta=0x0 cmd=(nvme_cmd_read slba=1048560, len=7, ctrl=0x8000, dsmgmt=7, reftag=0)
<idle>-0 [000] ..s. 64.807072: nvme_complete_rq: nvme0: disk=nvme0c0n1, qid=3, cmdid=2, res=0xffff88807c9e95d0, retries=0, flags=0x0, status=0x0
Please review.
Thanks,
Changes to V6:
- Removed the first patch by a suggestion from Christoph. The helper
nvmet_req_to_ctrl() has been moved to the last commit which
introduces the target-side tracing.
- Symbolic print for the opcodes for admin, nvm, and fabrics have been
moved to <linux/nvme.h> to be shared between host and target side.
It's just a bunch of macros so that we don't share the actual code
as suggested by Christoph.
- Print "device_path" when I/O commands come in and out. The uuid
will make the trace line too long so that we just can know the
backed device for the request.
- From the 2nd patch to 6th patch, they have been added to this series
to make sure the host-side trace supports the exactly same thing
with the target-side introduced.
Changes to V5:
- Provide trace code to the target-side instead of a common code
shared between host and target to avoid disadvantages something bad
for the performance like cache miss. It has been suggested by
Christoph.
- Removed the third patch out of this series because that has nothing
to do with this series.
- Merged the last two commits into a single commit for the review.
Changes to V4:
- Add Reviewed-by: tag from Sagi. (Thanks to Sagi)
- Consider endianness for cqe->status when assigning the value in
trace
- Add more descriptions about the variable arguments in events.
Changes to V3:
- Remove additional argument from the caller level.
Changes to V2:
- Provide a common code for both host and target. (Chaitanya)
- Add support for tracing requests in target-side (Chaitanya)
- Make it simple in trace.h without branch out from nvme core module
(Christoph)
Changes to V1:
- fabrics commands should also be decoded, not just showing that it's
a fabrics command. (Christoph)
- do not make it within nvme admin commands (Chaitany
Minwoo Im (7):
nvme: trace: do not EXPORT_SYMBOL for a trace function
nvme: trace: move opcode symbol print to nvme.h
nvme: trace: put cid with le16_to_cpu()
nvme: trace: support for fabrics commands in host-side
nvme: trace: filter out unnecessary fields for fabrics
nvme: trace: print result and status in hex format
nvmet: introduce target-side trace
drivers/nvme/host/trace.c | 88 +++++++++++++-
drivers/nvme/host/trace.h | 86 ++++----------
drivers/nvme/target/Makefile | 3 +
drivers/nvme/target/core.c | 8 ++
drivers/nvme/target/trace.c | 222 +++++++++++++++++++++++++++++++++++
drivers/nvme/target/trace.h | 140 ++++++++++++++++++++++
include/linux/nvme.h | 59 ++++++++++
7 files changed, 545 insertions(+), 61 deletions(-)
create mode 100644 drivers/nvme/target/trace.c
create mode 100644 drivers/nvme/target/trace.h
--
2.21.0
next reply other threads:[~2019-06-06 19:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-06 19:45 Minwoo Im [this message]
2019-06-06 19:45 ` [RFC PATCH V7 1/7] nvme: trace: do not EXPORT_SYMBOL for a trace function Minwoo Im
2019-06-06 19:45 ` [RFC PATCH V7 2/7] nvme: trace: move opcode symbol print to nvme.h Minwoo Im
2019-06-07 16:46 ` Christoph Hellwig
2019-06-08 1:57 ` Minwoo Im
2019-06-06 19:45 ` [RFC PATCH V7 3/7] nvme: trace: put cid with le16_to_cpu() Minwoo Im
2019-06-07 16:47 ` Christoph Hellwig
2019-06-08 1:35 ` Minwoo Im
2019-06-06 19:45 ` [RFC PATCH V7 4/7] nvme: trace: support for fabrics commands in host-side Minwoo Im
2019-06-07 16:51 ` Christoph Hellwig
2019-06-08 1:37 ` Minwoo Im
2019-06-06 19:45 ` [RFC PATCH V7 5/7] nvme: trace: filter out unnecessary fields for fabrics Minwoo Im
2019-06-07 16:52 ` Christoph Hellwig
2019-06-08 1:38 ` Minwoo Im
2019-06-06 19:45 ` [RFC PATCH V7 6/7] nvme: trace: print result and status in hex format Minwoo Im
2019-06-07 16:53 ` Christoph Hellwig
2019-06-06 19:45 ` [RFC PATCH V7 7/7] nvmet: introduce target-side trace Minwoo Im
2019-06-07 16:54 ` Christoph Hellwig
2019-06-08 1:49 ` Minwoo Im
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=20190606194512.11020-1-minwoo.im.dev@gmail.com \
--to=minwoo.im.dev@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.