|
@@ -3042,7 +3042,6 @@ static struct request *cfq_check_fifo(struct cfq_queue *cfqq)
|
|
if (ktime_get_ns() < rq->fifo_time)
|
|
if (ktime_get_ns() < rq->fifo_time)
|
|
rq = NULL;
|
|
rq = NULL;
|
|
|
|
|
|
- cfq_log_cfqq(cfqq->cfqd, cfqq, "fifo=%p", rq);
|
|
|
|
return rq;
|
|
return rq;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3420,6 +3419,9 @@ static bool cfq_may_dispatch(struct cfq_data *cfqd, struct cfq_queue *cfqq)
|
|
{
|
|
{
|
|
unsigned int max_dispatch;
|
|
unsigned int max_dispatch;
|
|
|
|
|
|
|
|
+ if (cfq_cfqq_must_dispatch(cfqq))
|
|
|
|
+ return true;
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Drain async requests before we start sync IO
|
|
* Drain async requests before we start sync IO
|
|
*/
|
|
*/
|
|
@@ -3511,15 +3513,20 @@ static bool cfq_dispatch_request(struct cfq_data *cfqd, struct cfq_queue *cfqq)
|
|
|
|
|
|
BUG_ON(RB_EMPTY_ROOT(&cfqq->sort_list));
|
|
BUG_ON(RB_EMPTY_ROOT(&cfqq->sort_list));
|
|
|
|
|
|
|
|
+ rq = cfq_check_fifo(cfqq);
|
|
|
|
+ if (rq)
|
|
|
|
+ cfq_mark_cfqq_must_dispatch(cfqq);
|
|
|
|
+
|
|
if (!cfq_may_dispatch(cfqd, cfqq))
|
|
if (!cfq_may_dispatch(cfqd, cfqq))
|
|
return false;
|
|
return false;
|
|
|
|
|
|
/*
|
|
/*
|
|
* follow expired path, else get first next available
|
|
* follow expired path, else get first next available
|
|
*/
|
|
*/
|
|
- rq = cfq_check_fifo(cfqq);
|
|
|
|
if (!rq)
|
|
if (!rq)
|
|
rq = cfqq->next_rq;
|
|
rq = cfqq->next_rq;
|
|
|
|
+ else
|
|
|
|
+ cfq_log_cfqq(cfqq->cfqd, cfqq, "fifo=%p", rq);
|
|
|
|
|
|
/*
|
|
/*
|
|
* insert request into driver dispatch list
|
|
* insert request into driver dispatch list
|
|
@@ -3989,7 +3996,7 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
|
|
* if the new request is sync, but the currently running queue is
|
|
* if the new request is sync, but the currently running queue is
|
|
* not, let the sync request have priority.
|
|
* not, let the sync request have priority.
|
|
*/
|
|
*/
|
|
- if (rq_is_sync(rq) && !cfq_cfqq_sync(cfqq))
|
|
|
|
|
|
+ if (rq_is_sync(rq) && !cfq_cfqq_sync(cfqq) && !cfq_cfqq_must_dispatch(cfqq))
|
|
return true;
|
|
return true;
|
|
|
|
|
|
/*
|
|
/*
|