mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
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 <guijianfeng@cn.fujitsu.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
a3b8d92d25
commit
b9d8f4c73b
1 changed files with 6 additions and 0 deletions
|
@ -1749,6 +1749,12 @@ static struct cfq_queue *cfq_close_cooperator(struct cfq_data *cfqd,
|
|||
if (CFQQ_SEEKY(cur_cfqq))
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* 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,
|
||||
|
|
Loading…
Reference in a new issue