[PATCH] CFQ: request <-> request merging rr_list fixup
In very rare circumstances would we be pruning a merged request and at the same time delete the implicated cfqq from the rr_list, and not readd it when the merged request got added. This could cause io stalls until that process issued io again. Fix it up by putting the rr_list add handling into cfq_add_rq_rb(), identical to how pruning is handled in cfq_del_rq_rb(). This fixes a hang reproducible with fsx-linux. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
eafa6cb18e
commit
5fccbf61be
|
@ -456,6 +456,9 @@ static void cfq_add_rq_rb(struct request *rq)
|
||||||
*/
|
*/
|
||||||
while ((__alias = elv_rb_add(&cfqq->sort_list, rq)) != NULL)
|
while ((__alias = elv_rb_add(&cfqq->sort_list, rq)) != NULL)
|
||||||
cfq_dispatch_insert(cfqd->queue, __alias);
|
cfq_dispatch_insert(cfqd->queue, __alias);
|
||||||
|
|
||||||
|
if (!cfq_cfqq_on_rr(cfqq))
|
||||||
|
cfq_add_cfqq_rr(cfqd, cfqq);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
@ -1652,9 +1655,6 @@ static void cfq_insert_request(request_queue_t *q, struct request *rq)
|
||||||
|
|
||||||
cfq_add_rq_rb(rq);
|
cfq_add_rq_rb(rq);
|
||||||
|
|
||||||
if (!cfq_cfqq_on_rr(cfqq))
|
|
||||||
cfq_add_cfqq_rr(cfqd, cfqq);
|
|
||||||
|
|
||||||
list_add_tail(&rq->queuelist, &cfqq->fifo);
|
list_add_tail(&rq->queuelist, &cfqq->fifo);
|
||||||
|
|
||||||
cfq_rq_enqueued(cfqd, cfqq, rq);
|
cfq_rq_enqueued(cfqd, cfqq, rq);
|
||||||
|
|
Loading…
Reference in New Issue