Commit cb887411 authored by Jens Axboe's avatar Jens Axboe Committed by Jens Axboe

cfq-iosched: tweak the FIFO checking

We currently check the FIFO once per slice. Optimize that a bit and
only do it as the first thing for a new slice, so we don't end up
doing a single request and then seek to the FIFO requests.
Signed-off-by: default avatarJens Axboe <>
parent 1792669c
......@@ -885,16 +885,17 @@ static inline struct request *cfq_check_fifo(struct cfq_queue *cfqq)
if (cfq_cfqq_fifo_expire(cfqq))
return NULL;
if (list_empty(&cfqq->fifo))
return NULL;
fifo = cfq_cfqq_class_sync(cfqq);
rq = rq_entry_fifo(cfqq->;
if (time_after(jiffies, rq->start_time + cfqd->cfq_fifo_expire[fifo])) {
if (time_after(jiffies, rq->start_time + cfqd->cfq_fifo_expire[fifo]))
return rq;
return NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment