From cd338fe28650147472d6b18c9f45430efb2b858b Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 1 Jun 2006 10:09:56 +0200 Subject: [PATCH] --- yaml --- r: 27073 b: refs/heads/master c: 12e9fddd6eb827937fcaac8ac7712c7303898b1f h: refs/heads/master i: 27071: b75924c10af3087a63f514a2cc5ddbabb6282693 v: v3 --- [refs] | 2 +- trunk/block/cfq-iosched.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 83fbea88a12a..5cad15f51a5a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e0de0206a2a37cd3e0ba9954d9f863e11d6d1782 +refs/heads/master: 12e9fddd6eb827937fcaac8ac7712c7303898b1f diff --git a/trunk/block/cfq-iosched.c b/trunk/block/cfq-iosched.c index d582433441c5..93ba54605eda 100644 --- a/trunk/block/cfq-iosched.c +++ b/trunk/block/cfq-iosched.c @@ -1747,14 +1747,24 @@ cfq_crq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq); + cic = crq->io_context; + /* * we never wait for an async request and we don't allow preemption * of an async request. so just return early */ - if (!cfq_crq_is_sync(crq)) + if (!cfq_crq_is_sync(crq)) { + /* + * sync process issued an async request, if it's waiting + * then expire it and kick rq handling. + */ + if (cic == cfqd->active_cic && + del_timer(&cfqd->idle_slice_timer)) { + cfq_slice_expired(cfqd, 0); + cfq_start_queueing(cfqd, cfqq); + } return; - - cic = crq->io_context; + } cfq_update_io_thinktime(cfqd, cic); cfq_update_io_seektime(cfqd, cic, crq);