diff options
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 501ffdf0399c..ea83a4f0c27d 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -599,7 +599,7 @@ cfq_group_slice(struct cfq_data *cfqd, struct cfq_group *cfqg) | |||
599 | } | 599 | } |
600 | 600 | ||
601 | static inline unsigned | 601 | static inline unsigned |
602 | cfq_scaled_group_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq) | 602 | cfq_scaled_cfqq_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq) |
603 | { | 603 | { |
604 | unsigned slice = cfq_prio_to_slice(cfqd, cfqq); | 604 | unsigned slice = cfq_prio_to_slice(cfqd, cfqq); |
605 | if (cfqd->cfq_latency) { | 605 | if (cfqd->cfq_latency) { |
@@ -631,7 +631,7 @@ cfq_scaled_group_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq) | |||
631 | static inline void | 631 | static inline void |
632 | cfq_set_prio_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq) | 632 | cfq_set_prio_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq) |
633 | { | 633 | { |
634 | unsigned slice = cfq_scaled_group_slice(cfqd, cfqq); | 634 | unsigned slice = cfq_scaled_cfqq_slice(cfqd, cfqq); |
635 | 635 | ||
636 | cfqq->slice_start = jiffies; | 636 | cfqq->slice_start = jiffies; |
637 | cfqq->slice_end = jiffies + slice; | 637 | cfqq->slice_end = jiffies + slice; |
@@ -1671,7 +1671,7 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
1671 | */ | 1671 | */ |
1672 | if (timed_out) { | 1672 | if (timed_out) { |
1673 | if (cfq_cfqq_slice_new(cfqq)) | 1673 | if (cfq_cfqq_slice_new(cfqq)) |
1674 | cfqq->slice_resid = cfq_scaled_group_slice(cfqd, cfqq); | 1674 | cfqq->slice_resid = cfq_scaled_cfqq_slice(cfqd, cfqq); |
1675 | else | 1675 | else |
1676 | cfqq->slice_resid = cfqq->slice_end - jiffies; | 1676 | cfqq->slice_resid = cfqq->slice_end - jiffies; |
1677 | cfq_log_cfqq(cfqd, cfqq, "resid=%ld", cfqq->slice_resid); | 1677 | cfq_log_cfqq(cfqd, cfqq, "resid=%ld", cfqq->slice_resid); |
@@ -3355,7 +3355,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
3355 | cfqd->busy_queues > 1) { | 3355 | cfqd->busy_queues > 1) { |
3356 | cfq_del_timer(cfqd, cfqq); | 3356 | cfq_del_timer(cfqd, cfqq); |
3357 | cfq_clear_cfqq_wait_request(cfqq); | 3357 | cfq_clear_cfqq_wait_request(cfqq); |
3358 | __blk_run_queue(cfqd->queue); | 3358 | __blk_run_queue(cfqd->queue, false); |
3359 | } else { | 3359 | } else { |
3360 | cfq_blkiocg_update_idle_time_stats( | 3360 | cfq_blkiocg_update_idle_time_stats( |
3361 | &cfqq->cfqg->blkg); | 3361 | &cfqq->cfqg->blkg); |
@@ -3370,7 +3370,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
3370 | * this new queue is RT and the current one is BE | 3370 | * this new queue is RT and the current one is BE |
3371 | */ | 3371 | */ |
3372 | cfq_preempt_queue(cfqd, cfqq); | 3372 | cfq_preempt_queue(cfqd, cfqq); |
3373 | __blk_run_queue(cfqd->queue); | 3373 | __blk_run_queue(cfqd->queue, false); |
3374 | } | 3374 | } |
3375 | } | 3375 | } |
3376 | 3376 | ||
@@ -3432,6 +3432,10 @@ static bool cfq_should_wait_busy(struct cfq_data *cfqd, struct cfq_queue *cfqq) | |||
3432 | { | 3432 | { |
3433 | struct cfq_io_context *cic = cfqd->active_cic; | 3433 | struct cfq_io_context *cic = cfqd->active_cic; |
3434 | 3434 | ||
3435 | /* If the queue already has requests, don't wait */ | ||
3436 | if (!RB_EMPTY_ROOT(&cfqq->sort_list)) | ||
3437 | return false; | ||
3438 | |||
3435 | /* If there are other queues in the group, don't wait */ | 3439 | /* If there are other queues in the group, don't wait */ |
3436 | if (cfqq->cfqg->nr_cfqq > 1) | 3440 | if (cfqq->cfqg->nr_cfqq > 1) |
3437 | return false; | 3441 | return false; |
@@ -3727,7 +3731,7 @@ static void cfq_kick_queue(struct work_struct *work) | |||
3727 | struct request_queue *q = cfqd->queue; | 3731 | struct request_queue *q = cfqd->queue; |
3728 | 3732 | ||
3729 | spin_lock_irq(q->queue_lock); | 3733 | spin_lock_irq(q->queue_lock); |
3730 | __blk_run_queue(cfqd->queue); | 3734 | __blk_run_queue(cfqd->queue, false); |
3731 | spin_unlock_irq(q->queue_lock); | 3735 | spin_unlock_irq(q->queue_lock); |
3732 | } | 3736 | } |
3733 | 3737 | ||