[PATCH 4/7] Expand block stats to export number of of requests per bucket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jes Sorensen <jsorensen@xxxxxx>

Signed-off-by: Jes Sorensen <jsorensen@xxxxxx>
---
 block/blk-sysfs.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 44517799a2e8..aeb69c57ffb7 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -542,6 +542,14 @@ static ssize_t queue_stat_show(struct request_queue *q, char *p)
 				       q->req_stat[i + 3 * bkt].sectors << 9);
 		}
 		off += sprintf(p + off, "\n");
+
+		off += sprintf(p + off, "%s reqs: ", name[i]);
+		for (bkt = 0; bkt < (BLK_REQ_STATS_BKTS / 3); bkt++) {
+			off += sprintf(p + off, "%u ",
+				       q->req_stat[i + 3 * bkt].nr_samples);
+		}
+
+		off += sprintf(p + off, "\n");
 	}
 	return off;
 }
-- 
2.17.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux