提交 05e90283 编写于 作者: P Paolo Valente 提交者: Jens Axboe

block, bfq: add missing rq_pos_tree update on rq removal

If two processes do I/O close to each other, then BFQ merges the
bfq_queues associated with these processes, to get a more sequential
I/O, and thus a higher throughput.  In this respect, to detect whether
two processes are doing I/O close to each other, BFQ keeps a list of
the head-of-line I/O requests of all active bfq_queues.  The list is
ordered by initial sectors, and implemented through a red-black tree
(rq_pos_tree).

Unfortunately, the update of the rq_pos_tree was incomplete, because
the tree was not updated on the removal of the head-of-line I/O
request of a bfq_queue, in case the queue did not remain empty. This
commit adds the missing update.
Signed-off-by: NPaolo Valente <paolo.valente@linaro.org>
Signed-off-by: NAngelo Ruocco <angeloruocco90@gmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 f0ba5ea2
...@@ -1627,6 +1627,8 @@ static void bfq_remove_request(struct request_queue *q, ...@@ -1627,6 +1627,8 @@ static void bfq_remove_request(struct request_queue *q,
rb_erase(&bfqq->pos_node, bfqq->pos_root); rb_erase(&bfqq->pos_node, bfqq->pos_root);
bfqq->pos_root = NULL; bfqq->pos_root = NULL;
} }
} else {
bfq_pos_tree_add_move(bfqd, bfqq);
} }
if (rq->cmd_flags & REQ_META) if (rq->cmd_flags & REQ_META)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册