block: hook up writeback throttling
Enable throttling of buffered writeback to make it a lot more smooth, and has way less impact on other system activity. Background writeback should be, by definition, background activity. The fact that we flush huge bundles of it at the time means that it potentially has heavy impacts on foreground workloads, which isn't ideal. We can't easily limit the sizes of writes that we do, since that would impact file system layout in the presence of delayed allocation. So just throttle back buffered writeback, unless someone is waiting for it. The algorithm for when to throttle takes its inspiration in the CoDel networking scheduling algorithm. Like CoDel, blk-wb monitors the minimum latencies of requests over a window of time. In that window of time, if the minimum latency of any request exceeds a given target, then a scale count is incremented and the queue depth is shrunk. The next monitoring window is shrunk accordingly. Unlike CoDel, if we hit a window that exhibits good ...
Showing
- Documentation/block/queue-sysfs.txt 7 additions, 0 deletionsDocumentation/block/queue-sysfs.txt
- block/Kconfig 26 additions, 0 deletionsblock/Kconfig
- block/blk-core.c 15 additions, 2 deletionsblock/blk-core.c
- block/blk-mq.c 24 additions, 2 deletionsblock/blk-mq.c
- block/blk-settings.c 4 additions, 0 deletionsblock/blk-settings.c
- block/blk-sysfs.c 88 additions, 0 deletionsblock/blk-sysfs.c
- block/cfq-iosched.c 14 additions, 0 deletionsblock/cfq-iosched.c
- include/linux/blkdev.h 3 additions, 0 deletionsinclude/linux/blkdev.h
Please register or sign in to comment