]> git.baikalelectronics.ru Git - kernel.git/commit
blk-wbt: add general throttling mechanism
authorJens Axboe <axboe@fb.com>
Wed, 9 Nov 2016 19:36:15 +0000 (12:36 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 10 Nov 2016 20:53:32 +0000 (13:53 -0700)
commit568e824483061398e86fd2376e2720324c275aaf
tree2cf40c43afdc01d953eae0098c4f8bb4d760c8d9
parent29d9e75af8aad636442db676a6ec4f5de2f605be
blk-wbt: add general throttling mechanism

We can hook this up to the block layer, to help throttle buffered
writes.

wbt registers a few trace points that can be used to track what is
happening in the system:

wbt_lat: 259:0: latency 2446318
wbt_stat: 259:0: rmean=2446318, rmin=2446318, rmax=2446318, rsamples=1,
               wmean=518866, wmin=15522, wmax=5330353, wsamples=57
wbt_step: 259:0: step down: step=1, window=72727272, background=8, normal=16, max=32

This shows a sync issue event (wbt_lat) that exceeded it's time. wbt_stat
dumps the current read/write stats for that window, and wbt_step shows a
step down event where we now scale back writes. Each trace includes the
device, 259:0 in this case.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/Makefile
block/blk-wbt.c [new file with mode: 0644]
block/blk-wbt.h [new file with mode: 0644]
include/trace/events/wbt.h [new file with mode: 0644]