|author||Gui Jianfeng <firstname.lastname@example.org>||2009-12-08 08:54:17 +0100|
|committer||Jens Axboe <email@example.com>||2009-12-09 15:11:03 +0100|
cfq: Optimization for close cooperating queue searching
It doesn't make any sense to try to find out a close cooperating queue if current cfqq is the only one in the group. Signed-off-by: Gui Jianfeng <firstname.lastname@example.org> Signed-off-by: Jens Axboe <email@example.com>
Diffstat (limited to 'block')
1 files changed, 6 insertions, 0 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 5009af490a0..b19cd684bf1 100644
@@ -1750,6 +1750,12 @@ static struct cfq_queue *cfq_close_cooperator(struct cfq_data *cfqd,
+ * Don't search priority tree if it's the only queue in the group.
+ if (cur_cfqq->cfqg->nr_cfqq == 1)
+ return NULL;
* We should notice if some of the queues are cooperating, eg
* working closely on the same area of the disk. In that case,
* we can group them together and don't waste time idling.