]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: writeback rate shouldn't artifically clamp
authorMichael Lyle <mlyle@lyle.org>
Fri, 13 Oct 2017 23:35:38 +0000 (16:35 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Oct 2017 15:07:26 +0000 (09:07 -0600)
commitb0cd1dd33b2c2b3b9904afe3c3b2dceda423effb
treeac09f29e7df62553409e7a36770e158464b4b6a2
parent26d6d53c738e0ef38eed94f66586625700b758f5
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>
drivers/md/bcache/bcache.h
drivers/md/bcache/util.h
drivers/md/bcache/writeback.c