Commits
Jens Axboe authored and Konstantin Khorenko committed 716d6e8c15a
ms/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> https://jira.sw.ru/browse/PSBM-96243 (cherry picked from commit e34cbd307477ae07c5d8a8d0bd15e65a9ddaba5c) Merged wbt hunks of patch which is already partially ported to RH7: 34dbad5d26e2 ("blk-stat: convert to callback-based statistics reporting"), And merge preparation patches to help it apply: 8054b89f8fca ("blk-wbt: remove stat ops")), fa224eed2b5e ("blk-wbt: cleanup disable-by-default for CFQ"), Also merged wbt hunks to fix compilation, request.issue_stat was not fully ported to RH7, so lets replace it: a8a45941706b ("block: pass struct request instead of struct blk_issue_stat to wbt") 544ccc8dc904 ("block: get rid of struct blk_issue_stat") Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> ===================== Patchset description: block: backport writeback throttling We have a problem that if we run heavy write load on one cpu simultaneousely with short direct reads on other cpu, the latter will hang significantly. Writeback throttling looks like a sollution for these reads, as it will decrease the priority of long running writeback. Running simple dd experiment we see that reads latency decreased after wbt patches applied: https://docs.google.com/spreadsheets/d/1HLtepwFL_N5zm0JcTqMtJoYnf-b6Slwld8DDgL0gNDI We've ran vconsolidate on custom kernel with these patches, though it does not show any performance improvement (likely because this test does not produce high rate of writeback), it does not crash or fail the test. https://jira.sw.ru/browse/PSBM-96243 Jens Axboe (6): block: add REQ_BACKGROUND writeback: add wbc_to_write_flags() writeback: mark background writeback as such writeback: track if we're sleeping on progress in balance_dirty_pages() blk-wbt: add general throttling mechanism block: hook up writeback throttling Omar Sandoval (1): block: get rid of struct blk_issue_stat Pavel Tikhomirov (2): x86/asm: remove the unused get_limit() method block: enable CONFIG_BLK_WBT* blk-wbt: increase maximum queue depth to increase performance of writes