]> git.baikalelectronics.ru Git - kernel.git/commit
blk-wbt: account flush requests correctly
authorJens Axboe <axboe@kernel.dk>
Mon, 5 Feb 2018 20:16:56 +0000 (13:16 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 6 Feb 2018 21:14:03 +0000 (14:14 -0700)
commite3d73bed0df5c0885e31d7a1ce7d132371d56ccc
treeffb33398840277a538332805a98b0d8c376152c1
parentfd45bf9cdb34de39ff1641138627ad8252f5de7e
blk-wbt: account flush requests correctly

Mikulas reported a workload that saw bad performance, and figured
out what it was due to various other types of requests being
accounted as reads. Flush requests, for instance. Due to the
high latency of those, we heavily throttle the writes to keep
the latencies in balance. But they really should be accounted
as writes.

Fix this by checking the exact type of the request. If it's a
read, account as a read, if it's a write or a flush, account
as a write. Any other request we disregard. Previously everything
would have been mistakenly accounted as reads.

Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org # v4.12+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-wbt.c