[PATCH 1/5] blk-stat: rename batch to time

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

 



From: Josef Bacik <josef@xxxxxxxxxxxxxx>

Batch isn't at all related to what it's actually used for, which is the
running sum of time spent doing IO.  Rename it to time so it makes
logical sense.

Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
---
 block/blk-stat.c          | 6 +++---
 include/linux/blk_types.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/block/blk-stat.c b/block/blk-stat.c
index 696a04176e4d..8a40ac719ba7 100644
--- a/block/blk-stat.c
+++ b/block/blk-stat.c
@@ -21,7 +21,7 @@ void blk_rq_stat_init(struct blk_rq_stat *stat)
 {
 	stat->min = -1ULL;
 	stat->max = stat->nr_samples = stat->mean = 0;
-	stat->batch = 0;
+	stat->time = 0;
 }
 
 /* src is a per-cpu stat, mean isn't initialized */
@@ -33,7 +33,7 @@ void blk_rq_stat_sum(struct blk_rq_stat *dst, struct blk_rq_stat *src)
 	dst->min = min(dst->min, src->min);
 	dst->max = max(dst->max, src->max);
 
-	dst->mean = div_u64(src->batch + dst->mean * dst->nr_samples,
+	dst->mean = div_u64(src->time + dst->mean * dst->nr_samples,
 				dst->nr_samples + src->nr_samples);
 
 	dst->nr_samples += src->nr_samples;
@@ -43,7 +43,7 @@ void blk_rq_stat_add(struct blk_rq_stat *stat, u64 value)
 {
 	stat->min = min(stat->min, value);
 	stat->max = max(stat->max, value);
-	stat->batch += value;
+	stat->time += value;
 	stat->nr_samples++;
 }
 
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 791fee35df88..df24baf455c2 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -446,7 +446,7 @@ struct blk_rq_stat {
 	u64 min;
 	u64 max;
 	u32 nr_samples;
-	u64 batch;
+	u64 time;
 };
 
 #endif /* __LINUX_BLK_TYPES_H */
-- 
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