]> git.baikalelectronics.ru Git - kernel.git/commit
block: make iolatency avg_lat exponentially decay
authorDennis Zhou (Facebook) <dennisszhou@gmail.com>
Thu, 2 Aug 2018 06:15:41 +0000 (23:15 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 2 Aug 2018 15:58:14 +0000 (09:58 -0600)
commit43c29158e7d9b353785a99b2551e3deb4062d2b4
treeb793725441cda9321981e427a5e68947656f1e58
parent4b550704d8d7978aeb5080d9bb17ccd37a0909d2
block: make iolatency avg_lat exponentially decay

Currently, avg_lat is calculated by accumulating the mean of every
window in a long running cumulative average. As time goes on, the metric
becomes less and less useful due to the accumulated history.

This patch reuses the same calculation done in load averages to make the
avg_lat metric more lively. Unlike load averages, the avg only advances
when a window elapses (due to an io). Idle periods extend the most
recent window. Bucketing is used to limit the history of avg_lat by
binding it to the window size. So, the window range for 1/exp (decay
rate) is [1 min, 2.5 min) when windows elapse immediately.

The current sample window size is exposed in the debug info to enable
calculation of the window range.

Signed-off-by: Dennis Zhou <dennisszhou@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Documentation/admin-guide/cgroup-v2.rst
block/blk-iolatency.c