From: Bart Van Assche <bart.vanassche@wdc.com>
To: "Martin K . Petersen" <martin.petersen@oracle.com>,
"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>
Cc: linux-scsi@vger.kernel.org,
Bart Van Assche <bart.vanassche@wdc.com>,
Hannes Reinecke <hare@suse.com>, Christoph Hellwig <hch@lst.de>,
Johannes Thumshirn <jthumshirn@suse.de>
Subject: [PATCH v2 3/3] Show .retries and .jiffies_at_alloc in debugfs
Date: Tue, 29 Aug 2017 17:07:42 -0700 [thread overview]
Message-ID: <20170830000742.29653-4-bart.vanassche@wdc.com> (raw)
In-Reply-To: <20170830000742.29653-1-bart.vanassche@wdc.com>
Make these two member variables available in debugfs such that
their value can be verified by kernel developers. An example of
the new output from a system with CONFIG_HZ=100:
ffff8804a41ed480 {.op=READ, .cmd_flags=META|PRIO, .rq_flags=MQ_INFLIGHT|IO_STAT, .atomic_flags=COMPLETE, .tag=17, .internal_tag=-1, .cmd=Read(10) 28 00 09 01 1f a0 00 00 08 00, .retries=0, .jiffies_at_alloc=-25647}
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
---
drivers/scsi/scsi_debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debugfs.c
index a97c9507103d..282834935e07 100644
--- a/drivers/scsi/scsi_debugfs.c
+++ b/drivers/scsi/scsi_debugfs.c
@@ -9,5 +9,6 @@ void scsi_show_rq(struct seq_file *m, struct request *rq)
char buf[80];
__scsi_format_command(buf, sizeof(buf), cmd->cmnd, cmd->cmd_len);
- seq_printf(m, ", .cmd=%s", buf);
+ seq_printf(m, ", .cmd=%s, .retries=%d, .jiffies_at_alloc=%ld", buf,
+ cmd->retries, cmd->jiffies_at_alloc - jiffies);
}
--
2.14.1
next prev parent reply other threads:[~2017-08-30 0:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 0:07 [PATCH v2 0/3] Improve requeuing behavior Bart Van Assche
2017-08-30 0:07 ` [PATCH v2 1/3] Call scsi_initialize_rq() also for filesystem requests Bart Van Assche
2017-08-30 8:29 ` Christoph Hellwig
2017-08-30 21:13 ` Bart Van Assche
2017-08-31 9:50 ` hch
2017-08-30 22:14 ` Brian King
2017-08-30 23:03 ` Bart Van Assche
2017-08-30 0:07 ` [PATCH v2 2/3] Improve requeuing behavior Bart Van Assche
2017-08-30 8:29 ` Christoph Hellwig
2017-08-30 0:07 ` Bart Van Assche [this message]
2017-08-30 8:30 ` [PATCH v2 3/3] Show .retries and .jiffies_at_alloc in debugfs Christoph Hellwig
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=20170830000742.29653-4-bart.vanassche@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=jthumshirn@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox