Commit 91b896f6 authored by Paolo Valente's avatar Paolo Valente Committed by Jens Axboe

block, bfq: do not raise non-default weights

BFQ heuristics try to detect interactive I/O, and raise the weight of
the queues containing such an I/O. Yet, if also the user changes the
weight of a queue (i.e., the user changes the ioprio of the process
associated with that queue), then it is most likely better to prevent
BFQ heuristics from silently changing the same weight.
Tested-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent ab1fb47e
...@@ -1671,15 +1671,19 @@ static void bfq_bfqq_handle_idle_busy_switch(struct bfq_data *bfqd, ...@@ -1671,15 +1671,19 @@ static void bfq_bfqq_handle_idle_busy_switch(struct bfq_data *bfqd,
* - it is sync, * - it is sync,
* - it does not belong to a large burst, * - it does not belong to a large burst,
* - it has been idle for enough time or is soft real-time, * - it has been idle for enough time or is soft real-time,
* - is linked to a bfq_io_cq (it is not shared in any sense). * - is linked to a bfq_io_cq (it is not shared in any sense),
* - has a default weight (otherwise we assume the user wanted
* to control its weight explicitly)
*/ */
in_burst = bfq_bfqq_in_large_burst(bfqq); in_burst = bfq_bfqq_in_large_burst(bfqq);
soft_rt = bfqd->bfq_wr_max_softrt_rate > 0 && soft_rt = bfqd->bfq_wr_max_softrt_rate > 0 &&
!BFQQ_TOTALLY_SEEKY(bfqq) && !BFQQ_TOTALLY_SEEKY(bfqq) &&
!in_burst && !in_burst &&
time_is_before_jiffies(bfqq->soft_rt_next_start) && time_is_before_jiffies(bfqq->soft_rt_next_start) &&
bfqq->dispatched == 0; bfqq->dispatched == 0 &&
*interactive = !in_burst && idle_for_long_time; bfqq->entity.new_weight == 40;
*interactive = !in_burst && idle_for_long_time &&
bfqq->entity.new_weight == 40;
wr_or_deserves_wr = bfqd->low_latency && wr_or_deserves_wr = bfqd->low_latency &&
(bfqq->wr_coeff > 1 || (bfqq->wr_coeff > 1 ||
(bfq_bfqq_sync(bfqq) && (bfq_bfqq_sync(bfqq) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment