LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] nvme: change order of qid and cmdid in completion trace
@ 2018-04-26 19:49 Johannes Thumshirn
  2018-04-26 20:01 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Thumshirn @ 2018-04-26 19:49 UTC (permalink / raw)
  To: Keith Busch
  Cc: Linux NVMe Mailinglist, Linux Kernel Mailinglist,
	Christoph Hellwig, Sagi Grimberg, Johannes Thumshirn

Keith reported that command submission and command completion
tracepoints have the order of the cmdid and qid fileds swapped.

While it isn't easily possible to change the command submission
tracepoint, as there is a regression test parsing it in blktests we
can swap the command completion tracepoint to have the fileds aligned.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reported-by: Keith Busch <keith.busch@intel.com>
---
 drivers/nvme/host/trace.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/host/trace.h b/drivers/nvme/host/trace.h
index ea91fccd1bc0..01390f0e1671 100644
--- a/drivers/nvme/host/trace.h
+++ b/drivers/nvme/host/trace.h
@@ -148,8 +148,8 @@ TRACE_EVENT(nvme_complete_rq,
 		    __entry->flags = nvme_req(req)->flags;
 		    __entry->status = nvme_req(req)->status;
 	    ),
-	    TP_printk("cmdid=%u, qid=%d, res=%llu, retries=%u, flags=0x%x, status=%u",
-		      __entry->cid, __entry->qid, __entry->result,
+	    TP_printk("qid=%d, cmdid=%u, res=%llu, retries=%u, flags=0x%x, status=%u",
+		      __entry->qid, __entry->cid, __entry->result,
 		      __entry->retries, __entry->flags, __entry->status)
 
 );
-- 
2.16.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme: change order of qid and cmdid in completion trace
  2018-04-26 19:49 [PATCH] nvme: change order of qid and cmdid in completion trace Johannes Thumshirn
@ 2018-04-26 20:01 ` Jens Axboe
  2018-04-26 20:21   ` Johannes Thumshirn
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2018-04-26 20:01 UTC (permalink / raw)
  To: Johannes Thumshirn, Keith Busch
  Cc: Sagi Grimberg, Linux Kernel Mailinglist, Linux NVMe Mailinglist,
	Christoph Hellwig

On 4/26/18 1:49 PM, Johannes Thumshirn wrote:
> Keith reported that command submission and command completion
> tracepoints have the order of the cmdid and qid fileds swapped.
> 
> While it isn't easily possible to change the command submission
> tracepoint, as there is a regression test parsing it in blktests we
> can swap the command completion tracepoint to have the fileds aligned.

It also makes more sense to have qid before cmdid.

Also, fileds -> fields, in two spots.

With that:

Reviewed-by: Jens Axboe <axboe@kernel.dk>

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme: change order of qid and cmdid in completion trace
  2018-04-26 20:01 ` Jens Axboe
@ 2018-04-26 20:21   ` Johannes Thumshirn
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2018-04-26 20:21 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Keith Busch, Sagi Grimberg, Linux Kernel Mailinglist,
	Linux NVMe Mailinglist, Christoph Hellwig

On Thu, Apr 26, 2018 at 02:01:59PM -0600, Jens Axboe wrote:
> On 4/26/18 1:49 PM, Johannes Thumshirn wrote:
> > Keith reported that command submission and command completion
> > tracepoints have the order of the cmdid and qid fileds swapped.
> > 
> > While it isn't easily possible to change the command submission
> > tracepoint, as there is a regression test parsing it in blktests we
> > can swap the command completion tracepoint to have the fileds aligned.
> 
> It also makes more sense to have qid before cmdid.
> 
> Also, fileds -> fields, in two spots.

Args. Thanks

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-26 20:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26 19:49 [PATCH] nvme: change order of qid and cmdid in completion trace Johannes Thumshirn
2018-04-26 20:01 ` Jens Axboe
2018-04-26 20:21   ` Johannes Thumshirn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).