diff options
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index d582433441c5..93ba54605eda 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -1747,14 +1747,24 @@ cfq_crq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
1747 | 1747 | ||
1748 | cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq); | 1748 | cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq); |
1749 | 1749 | ||
1750 | cic = crq->io_context; | ||
1751 | |||
1750 | /* | 1752 | /* |
1751 | * we never wait for an async request and we don't allow preemption | 1753 | * we never wait for an async request and we don't allow preemption |
1752 | * of an async request. so just return early | 1754 | * of an async request. so just return early |
1753 | */ | 1755 | */ |
1754 | if (!cfq_crq_is_sync(crq)) | 1756 | if (!cfq_crq_is_sync(crq)) { |
1757 | /* | ||
1758 | * sync process issued an async request, if it's waiting | ||
1759 | * then expire it and kick rq handling. | ||
1760 | */ | ||
1761 | if (cic == cfqd->active_cic && | ||
1762 | del_timer(&cfqd->idle_slice_timer)) { | ||
1763 | cfq_slice_expired(cfqd, 0); | ||
1764 | cfq_start_queueing(cfqd, cfqq); | ||
1765 | } | ||
1755 | return; | 1766 | return; |
1756 | 1767 | } | |
1757 | cic = crq->io_context; | ||
1758 | 1768 | ||
1759 | cfq_update_io_thinktime(cfqd, cic); | 1769 | cfq_update_io_thinktime(cfqd, cic); |
1760 | cfq_update_io_seektime(cfqd, cic, crq); | 1770 | cfq_update_io_seektime(cfqd, cic, crq); |