]> git.baikalelectronics.ru Git - kernel.git/commit
blk-wbt: fix performance regression in wbt scale_up/scale_down
authorHarshad Shirwadkar <harshadshirwadkar@gmail.com>
Sat, 5 Oct 2019 18:59:27 +0000 (11:59 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 6 Oct 2019 15:26:41 +0000 (09:26 -0600)
commitf8d23fc46ba293c59892fb4ef9d6d7b1e75dcc63
treec69d5489e1f70ed4b22a7753ac61c26660b8454a
parent1ed848c05a2f6180cb54883052d126b90d46f78c
blk-wbt: fix performance regression in wbt scale_up/scale_down

scale_up wakes up waiters after scaling up. But after scaling max, it
should not wake up more waiters as waiters will not have anything to
do. This patch fixes this by making scale_up (and also scale_down)
return when threshold is reached.

This bug causes increased fdatasync latency when fdatasync and dd
conv=sync are performed in parallel on 4.19 compared to 4.14. This
bug was introduced during refactoring of blk-wbt code.

Fixes: d3794638741b ("blk-rq-qos: refactor out common elements of blk-wbt")
Cc: stable@vger.kernel.org
Cc: Josef Bacik <jbacik@fb.com>
Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-rq-qos.c
block/blk-rq-qos.h
block/blk-wbt.c