Messages in this thread Patch in this message | | | From | Corrado Zoccolo <> | Subject | [PATCH] cfq-iosched: non-rot devices do not need queue merging | Date | Wed, 30 Dec 2009 13:10:04 +0100 |
| |
Non rotational devices' performances are not affected by distance of requests, so there is no point in having overhead to merge queues of nearby requests.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com> --- block/cfq-iosched.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 918c7fd..01bb0f3 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1268,7 +1268,8 @@ static void cfq_prio_tree_add(struct cfq_data *cfqd, struct cfq_queue *cfqq) return; if (!cfqq->next_rq) return; - + if (blk_queue_nonrot(cfqd->queue)) + return; cfqq->p_root = &cfqd->prio_trees[cfqq->org_ioprio]; __cfqq = cfq_prio_tree_lookup(cfqd, cfqq->p_root, blk_rq_pos(cfqq->next_rq), &parent, &p); @@ -1689,7 +1690,7 @@ static struct cfq_queue *cfqq_close(struct cfq_data *cfqd, struct cfq_queue *__cfqq; sector_t sector = cfqd->last_position; - if (RB_EMPTY_ROOT(root)) + if (RB_EMPTY_ROOT(root) || blk_queue_nonrot(cfqd->queue)) return NULL; /* -- 1.6.4.4
| |