From: Keith Busch <keith.busch@linux.intel.com>
To: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Keith Busch <keith.busch@intel.com>,
James Smart <james.smart@broadcom.com>,
Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
Linux NVMe Mailinglist <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH v5 2/2] nvme: trace: add disk name to tracepoints
Date: Wed, 27 Jun 2018 10:37:06 -0600 [thread overview]
Message-ID: <20180627163706.GA9361@localhost.localdomain> (raw)
In-Reply-To: <20180627125324.22064-3-jthumshirn@suse.de>
On Wed, Jun 27, 2018 at 02:53:24PM +0200, Johannes Thumshirn wrote:
> TP_fast_assign(
> - __entry->qid = qid;
> + __assign_str(name, disk_name);
> + __entry->ctrl_id = nvme_req(req)->ctrl->cntlid;
> + __entry->qid = req->q->id;
> __entry->opcode = cmd->common.opcode;
> __entry->flags = cmd->common.flags;
> __entry->cid = cmd->common.command_id;
> @@ -122,10 +130,10 @@ TRACE_EVENT(nvme_setup_nvm_cmd,
> memcpy(__entry->cdw10, cmd->common.cdw10,
> sizeof(__entry->cdw10));
> ),
> - TP_printk("qid=%d, nsid=%u, cmdid=%u, flags=0x%x, meta=0x%llx, cmd=(%s %s)",
> - __entry->qid, __entry->nsid, __entry->cid,
> - __entry->flags, __entry->metadata,
> - show_opcode_name(__entry->opcode),
> + TP_printk("nvme%d: disk=%s, qid=%d, nsid=%u, cmdid=%u, flags=0x%x, meta=0x%llx, cmd=(%s %s)",
> + __entry->ctrl_id, __get_str(name), __entry->qid,
> + __entry->nsid, __entry->cid, __entry->flags,
> + __entry->metadata, show_opcode_name(__entry->opcode),
> __parse_nvme_cmd(__entry->opcode, __entry->cdw10))
> );
This looks a bit confusing to me. The ctrl->cntlid you're using in
__entry->ctrl_id isn't a unique value across subsystems, and it will
typically be 0 for all controllers that are the only controller in
their subsystem.
It looks like you want the # assigned to /dev/nvme<#>. Do you want to
use ctrl->instance here instead?
next prev parent reply other threads:[~2018-06-27 16:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 12:53 [PATCH v5 0/2] nvme: add controller id and disk name to tracepoints Johannes Thumshirn
2018-06-27 12:53 ` [PATCH v5 1/2] nvme: cache struct nvme_ctrl reference to struct nvme_request Johannes Thumshirn
2018-06-27 16:40 ` James Smart
2018-06-27 12:53 ` [PATCH v5 2/2] nvme: trace: add disk name to tracepoints Johannes Thumshirn
2018-06-27 16:37 ` Keith Busch [this message]
2018-06-28 7:48 ` Johannes Thumshirn
2018-06-28 20:55 ` Keith Busch
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=20180627163706.GA9361@localhost.localdomain \
--to=keith.busch@linux.intel.com \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=jthumshirn@suse.de \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox