aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/bcache.h
diff options
context:
space:
mode:
authorMichael Lyle <mlyle@lyle.org>2017-10-13 16:35:38 -0700
committerJens Axboe <axboe@kernel.dk>2017-10-16 09:07:26 -0600
commite41166c5c44e30dbd620f7c77a27efe5d5cc551a (patch)
treeac09f29e7df62553409e7a36770e158464b4b6a2 /drivers/md/bcache/bcache.h
parentbcache: smooth writeback rate control (diff)
downloadlinux-dev-e41166c5c44e30dbd620f7c77a27efe5d5cc551a.tar.xz
linux-dev-e41166c5c44e30dbd620f7c77a27efe5d5cc551a.zip
bcache: writeback rate shouldn't artifically clamp
The previous code artificially limited writeback rate to 1000000 blocks/second (NSEC_PER_MSEC), which is a rate that can be met on fast hardware. The rate limiting code works fine (though with decreased precision) up to 3 orders of magnitude faster, so use NSEC_PER_SEC. Additionally, ensure that uint32_t is used as a type for rate throughout the rate management so that type checking/clamp_t can work properly. bch_next_delay should be rewritten for increased precision and better handling of high rates and long sleep periods, but this is adequate for now. Signed-off-by: Michael Lyle <mlyle@lyle.org> Reported-by: Coly Li <colyli@suse.de> Reviewed-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/bcache.h')
-rw-r--r--drivers/md/bcache/bcache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h
index eb83be693d60..d77c4829c497 100644
--- a/drivers/md/bcache/bcache.h
+++ b/drivers/md/bcache/bcache.h
@@ -361,7 +361,7 @@ struct cached_dev {
int64_t writeback_rate_proportional;
int64_t writeback_rate_integral;
int64_t writeback_rate_integral_scaled;
- int64_t writeback_rate_change;
+ int32_t writeback_rate_change;
unsigned writeback_rate_update_seconds;
unsigned writeback_rate_i_term_inverse;