summaryrefslogtreecommitdiff
path: root/block/blk-iocost.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2020-09-01 21:52:40 +0300
committerJens Axboe <axboe@kernel.dk>2020-09-02 04:38:32 +0300
commitce95570acf741ea306baddcb43aba0b59b920a21 (patch)
tree87aab92722d434d011a1e8a54c90064fc27570f2 /block/blk-iocost.c
parentbd0adb91a68b2fbf384ace5287bb46f135e8d889 (diff)
downloadlinux-ce95570acf741ea306baddcb43aba0b59b920a21.tar.xz
blk-iocost: make ioc_now->now and ioc->period_at 64bit
They are in microseconds and wrap in around 1.2 hours with u32. While unlikely, confusions from wraparounds are still possible. We aren't saving anything meaningful by keeping these u32. Let's make them u64. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-iocost.c')
-rw-r--r--block/blk-iocost.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 00c5a3ad2b5b..dc72cd965837 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -409,7 +409,7 @@ struct ioc {
atomic64_t vtime_rate;
seqcount_spinlock_t period_seqcount;
- u32 period_at; /* wallclock starttime */
+ u64 period_at; /* wallclock starttime */
u64 period_at_vtime; /* vtime starttime */
atomic64_t cur_period; /* inc'd each period */
@@ -508,7 +508,7 @@ struct ioc_cgrp {
struct ioc_now {
u64 now_ns;
- u32 now;
+ u64 now;
u64 vnow;
u64 vrate;
};