Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1420922 > unrolled thread

[PATCH 28/30] drbd: finally report ms, not jiffies, in log message

Started byPhilipp Reisner <philipp.reisner@linbit.com>
First post2016-06-13 16:30 +0200
Last post2016-06-13 16:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 28/30] drbd: finally report ms, not jiffies, in log message Philipp Reisner <philipp.reisner@linbit.com> - 2016-06-13 16:30 +0200

#1420922 — [PATCH 28/30] drbd: finally report ms, not jiffies, in log message

FromPhilipp Reisner <philipp.reisner@linbit.com>
Date2016-06-13 16:30 +0200
Subject[PATCH 28/30] drbd: finally report ms, not jiffies, in log message
Message-ID<rJB2i-7sn-49@gated-at.bofh.it>
From: Lars Ellenberg <lars.ellenberg@linbit.com>

Also skip the message unless bitmap IO took longer than 5 ms.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
 drivers/block/drbd/drbd_bitmap.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index 17e5e60..801b8f3 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -1121,10 +1121,14 @@ static int bm_rw(struct drbd_device *device, const unsigned int flags, unsigned
 		kref_put(&ctx->kref, &drbd_bm_aio_ctx_destroy);
 
 	/* summary for global bitmap IO */
-	if (flags == 0)
-		drbd_info(device, "bitmap %s of %u pages took %lu jiffies\n",
-			 (flags & BM_AIO_READ) ? "READ" : "WRITE",
-			 count, jiffies - now);
+	if (flags == 0) {
+		unsigned int ms = jiffies_to_msecs(jiffies - now);
+		if (ms > 5) {
+			drbd_info(device, "bitmap %s of %u pages took %u ms\n",
+				 (flags & BM_AIO_READ) ? "READ" : "WRITE",
+				 count, ms);
+		}
+	}
 
 	if (ctx->error) {
 		drbd_alert(device, "we had at least one MD IO ERROR during bitmap IO\n");
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web