bcache: add idle_max_writeback_rate sysfs interface
For writeback mode, if there is no regular I/O request for a while, the writeback rate will be set to the maximum value (1TB/s for now). This is good for most of the storage workload, but there are still people don't what the maximum writeback rate in I/O idle time. This patch adds a sysfs interface file idle_max_writeback_rate to permit people to disable maximum writeback rate. Then the minimum writeback rate can be advised by writeback_rate_minimum in the bcache device's sysfs interface. Reported-by: Christian Balzer <chibi@gol.com> Signed-off-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -122,6 +122,10 @@ static void __update_writeback_rate(struct cached_dev *dc)
|
||||
static bool set_at_max_writeback_rate(struct cache_set *c,
|
||||
struct cached_dev *dc)
|
||||
{
|
||||
/* Don't sst max writeback rate if it is disabled */
|
||||
if (!c->idle_max_writeback_rate_enabled)
|
||||
return false;
|
||||
|
||||
/* Don't set max writeback rate if gc is running */
|
||||
if (!c->gc_mark_valid)
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user