summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorFederico Motta <federico@willer.it>2018-10-24 19:13:25 +0200
committerJens Axboe <axboe@kernel.dk>2018-10-25 11:17:40 -0600
commit98fa7a3e001b21fb47c08af4304f40a3b0535cbd (patch)
treee464e2b29bc9cbbc68bef8fdc0a159d6e2571dfa /tools/lib
parent0a40a93524736c2ce01d82effe2f2bc34d5cf159 (diff)
downloadlinux-98fa7a3e001b21fb47c08af4304f40a3b0535cbd.tar.gz
linux-98fa7a3e001b21fb47c08af4304f40a3b0535cbd.tar.bz2
linux-98fa7a3e001b21fb47c08af4304f40a3b0535cbd.zip
block, bfq: fix asymmetric scenarios detection
Since commit 2d29c9f89fcd ("block, bfq: improve asymmetric scenarios detection"), a scenario is defined asymmetric when one of the following conditions holds: - active bfq_queues have different weights - one or more group of entities (bfq_queue or other groups of entities) are active bfq grants fairness and low latency also in such asymmetric scenarios, by plugging the dispatching of I/O if the bfq_queue in service happens to be temporarily idle. This plugging may lower throughput, so it is important to do it only when strictly needed. By mistake, in commit '2d29c9f89fcd' ("block, bfq: improve asymmetric scenarios detection") the num_active_groups counter was firstly incremented and subsequently decremented at any entity (group or bfq_queue) weight change. This is useless, because only transitions from active to inactive and vice versa matter for that counter. Unfortunately this is also incorrect in the following case: the entity at issue is a bfq_queue and it is under weight raising. In fact in this case there is a spurious increment of the num_active_groups counter. This spurious increment may cause scenarios to be wrongly detected as asymmetric, thus causing useless plugging and loss of throughput. This commit fixes this issue by simply removing the above useless and wrong increments and decrements. Fixes: 2d29c9f89fcd ("block, bfq: improve asymmetric scenarios detection") Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Signed-off-by: Federico Motta <federico@willer.it> Signed-off-by: Paolo Valente <paolo.valente@linaro.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/lib')
0 files changed, 0 insertions, 0 deletions