From: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org,
Guoqing Jiang <guoqing.jiang@cloud.ionos.com>,
Philipp Reisner <philipp.reisner@linbit.com>,
Lars Ellenberg <lars.ellenberg@linbit.com>,
drbd-dev@lists.linbit.com
Subject: [PATCH RFC 3/5] drbd: rename start_jif to start_ns
Date: Wed, 8 Jul 2020 09:58:17 +0200 [thread overview]
Message-ID: <20200708075819.4531-4-guoqing.jiang@cloud.ionos.com> (raw)
In-Reply-To: <20200708075819.4531-1-guoqing.jiang@cloud.ionos.com>
Let's rename start_jif to start_ns to reflect that bio_start_io_acct
returns ns presicion now.
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: drbd-dev@lists.linbit.com
Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
---
drivers/block/drbd/drbd_debugfs.c | 8 ++++----
drivers/block/drbd/drbd_int.h | 2 +-
drivers/block/drbd/drbd_req.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/block/drbd/drbd_debugfs.c b/drivers/block/drbd/drbd_debugfs.c
index b3b9cd5628fd..672fd7e6587d 100644
--- a/drivers/block/drbd/drbd_debugfs.c
+++ b/drivers/block/drbd/drbd_debugfs.c
@@ -105,7 +105,7 @@ static void seq_print_one_request(struct seq_file *m, struct drbd_request *req,
(s & RQ_WRITE) ? "W" : "R");
#define RQ_HDR_2 "\tstart\tin AL\tsubmit"
- seq_printf(m, "\t%d", jiffies_to_msecs(now - req->start_jif));
+ seq_printf(m, "\t%llu", (ktime_get_ns() - req->start_ns) / NSEC_PER_MSEC);
seq_print_age_or_dash(m, s & RQ_IN_ACT_LOG, now - req->in_actlog_jif);
seq_print_age_or_dash(m, s & RQ_LOCAL_PENDING, now - req->pre_submit_jif);
@@ -161,7 +161,7 @@ static void seq_print_waiting_for_AL(struct seq_file *m, struct drbd_resource *r
seq_puts(m, "minor\tvnr\tage\t#waiting\n");
rcu_read_lock();
idr_for_each_entry(&resource->devices, device, i) {
- unsigned long jif;
+ unsigned long ns;
struct drbd_request *req;
int n = atomic_read(&device->ap_actlog_cnt);
if (n) {
@@ -171,7 +171,7 @@ static void seq_print_waiting_for_AL(struct seq_file *m, struct drbd_resource *r
/* if the oldest request does not wait for the activity log
* it is not interesting for us here */
if (req && !(req->rq_state & RQ_IN_ACT_LOG))
- jif = req->start_jif;
+ ns = req->start_ns;
else
req = NULL;
spin_unlock_irq(&device->resource->req_lock);
@@ -179,7 +179,7 @@ static void seq_print_waiting_for_AL(struct seq_file *m, struct drbd_resource *r
if (n) {
seq_printf(m, "%u\t%u\t", device->minor, device->vnr);
if (req)
- seq_printf(m, "%u\t", jiffies_to_msecs(now - jif));
+ seq_printf(m, "%llu\t", (ktime_get_ns() - ns) / NSEC_PER_MSEC);
else
seq_puts(m, "-\t");
seq_printf(m, "%u\n", n);
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index aacd2010b555..467d96316230 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -301,7 +301,7 @@ struct drbd_request {
struct list_head req_pending_local;
/* for generic IO accounting */
- unsigned long start_jif;
+ unsigned long start_ns;
/* for DRBD internal statistics */
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index f705128b4f27..6ad6b4470ebd 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -245,7 +245,7 @@ void drbd_req_complete(struct drbd_request *req, struct bio_and_error *m)
start_new_tl_epoch(first_peer_device(device)->connection);
/* Update disk stats */
- bio_end_io_acct(req->master_bio, req->start_jif);
+ bio_end_io_acct(req->master_bio, req->start_ns);
/* If READ failed,
* have it be pushed back to the retry work queue,
@@ -1206,7 +1206,7 @@ drbd_request_prepare(struct drbd_device *device, struct bio *bio)
}
/* Update disk stats */
- req->start_jif = bio_start_io_acct(req->master_bio);
+ req->start_ns = bio_start_io_acct(req->master_bio);
if (!get_ldev(device)) {
bio_put(req->private_bio);
--
2.17.1
next prev parent reply other threads:[~2020-07-08 7:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 7:58 [RFC PATCH 0/4] block: add two statistic tables Guoqing Jiang
2020-07-08 7:58 ` [PATCH RFC 1/5] block: return ns precision from disk_start_io_acct Guoqing Jiang
2020-07-08 13:27 ` Ming Lei
2020-07-08 13:53 ` Guoqing Jiang
2020-07-08 17:46 ` Guoqing Jiang
2020-07-08 7:58 ` [PATCH RFC 2/5] drbd: remove unused argument from drbd_request_prepare and __drbd_make_request Guoqing Jiang
2020-07-08 7:58 ` Guoqing Jiang [this message]
2020-07-08 7:58 ` [PATCH RFC 4/5] block: add a statistic table for io latency Guoqing Jiang
2020-07-08 13:29 ` Ming Lei
2020-07-08 14:02 ` Guoqing Jiang
2020-07-08 14:06 ` Guoqing Jiang
2020-07-09 18:48 ` Guoqing Jiang
2020-07-10 0:53 ` Ming Lei
2020-07-10 8:55 ` Guoqing Jiang
2020-07-10 10:00 ` Ming Lei
2020-07-10 10:29 ` Guoqing Jiang
2020-07-11 1:32 ` Ming Lei
2020-07-12 20:39 ` Guoqing Jiang
2020-07-12 20:44 ` Jens Axboe
2020-07-12 21:04 ` Guoqing Jiang
2020-07-10 14:04 ` Jens Axboe
2020-07-08 7:58 ` [PATCH RFC 5/5] block: add a statistic table for io sector Guoqing Jiang
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=20200708075819.4531-4-guoqing.jiang@cloud.ionos.com \
--to=guoqing.jiang@cloud.ionos.com \
--cc=axboe@kernel.dk \
--cc=drbd-dev@lists.linbit.com \
--cc=lars.ellenberg@linbit.com \
--cc=linux-block@vger.kernel.org \
--cc=philipp.reisner@linbit.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