aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 93ba54605eda..5d2047b93eb5 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -133,6 +133,7 @@ struct cfq_data {
133 mempool_t *crq_pool; 133 mempool_t *crq_pool;
134 134
135 int rq_in_driver; 135 int rq_in_driver;
136 int hw_tag;
136 137
137 /* 138 /*
138 * schedule slice state info 139 * schedule slice state info
@@ -664,6 +665,15 @@ static void cfq_activate_request(request_queue_t *q, struct request *rq)
664 struct cfq_data *cfqd = q->elevator->elevator_data; 665 struct cfq_data *cfqd = q->elevator->elevator_data;
665 666
666 cfqd->rq_in_driver++; 667 cfqd->rq_in_driver++;
668
669 /*
670 * If the depth is larger 1, it really could be queueing. But lets
671 * make the mark a little higher - idling could still be good for
672 * low queueing, and a low queueing number could also just indicate
673 * a SCSI mid layer like behaviour where limit+1 is often seen.
674 */
675 if (!cfqd->hw_tag && cfqd->rq_in_driver > 4)
676 cfqd->hw_tag = 1;
667} 677}
668 678
669static void cfq_deactivate_request(request_queue_t *q, struct request *rq) 679static void cfq_deactivate_request(request_queue_t *q, struct request *rq)
@@ -1465,7 +1475,8 @@ retry:
1465 * set ->slice_left to allow preemption for a new process 1475 * set ->slice_left to allow preemption for a new process
1466 */ 1476 */
1467 cfqq->slice_left = 2 * cfqd->cfq_slice_idle; 1477 cfqq->slice_left = 2 * cfqd->cfq_slice_idle;
1468 cfq_mark_cfqq_idle_window(cfqq); 1478 if (!cfqd->hw_tag)
1479 cfq_mark_cfqq_idle_window(cfqq);
1469 cfq_mark_cfqq_prio_changed(cfqq); 1480 cfq_mark_cfqq_prio_changed(cfqq);
1470 cfq_init_prio_data(cfqq); 1481 cfq_init_prio_data(cfqq);
1471 } 1482 }
@@ -1656,7 +1667,7 @@ cfq_update_idle_window(struct cfq_data *cfqd, struct cfq_queue *cfqq,
1656{ 1667{
1657 int enable_idle = cfq_cfqq_idle_window(cfqq); 1668 int enable_idle = cfq_cfqq_idle_window(cfqq);
1658 1669
1659 if (!cic->ioc->task || !cfqd->cfq_slice_idle) 1670 if (!cic->ioc->task || !cfqd->cfq_slice_idle || cfqd->hw_tag)
1660 enable_idle = 0; 1671 enable_idle = 0;
1661 else if (sample_valid(cic->ttime_samples)) { 1672 else if (sample_valid(cic->ttime_samples)) {
1662 if (cic->ttime_mean > cfqd->cfq_slice_idle) 1673 if (cic->ttime_mean > cfqd->cfq_slice_idle)