aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-wbt.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-11-16blk-wbt: fix old-style function declarationArnd Bergmann1-1/+1
The newly added driver causes a harmless warning in some configurations: block/blk-wbt.c:250:1: error: ‘inline’ is not at beginning of declaration [-Werror=old-style-declaration] static bool inline stat_sample_valid(struct blk_rq_stat *stat) This makes it use the expected format for the declaration. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jens Axboe <axboe@fb.com>
2016-11-11blk-wbt: use BLK_STAT_{READ,WRITE} instead of 0/1Jens Axboe1-6/+6
Since we have proper enums for the stats directions, use them. Signed-off-by: Jens Axboe <axboe@fb.com>
2016-11-11blk-wbt: remove stat opsJens Axboe1-10/+5
Again a leftover from when the throttling code was generic. Now that we just have the block user, get rid of the stat ops and indirections. Signed-off-by: Jens Axboe <axboe@fb.com>
2016-11-11blk-wbt: store queue instead of bdiJens Axboe1-8/+12
The bdi was a leftover from when the code was block layer agnostic. Now that we just support a block layer user, store the queue directly. Signed-off-by: Jens Axboe <axboe@fb.com>
2016-11-10blk-wbt: add general throttling mechanismJens Axboe1-0/+735
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>