From 69c97bb197984e3d4b756529de0b98f6a6b0f342 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 14 Apr 2009 14:18:16 +0200 Subject: [PATCH] --- yaml --- r: 143330 b: refs/heads/master c: d6ceb25e8d8bccf826848c2621a50d02c0a7f4ae h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/block/cfq-iosched.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 26ea989ce486..db4768cd3b9f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 053c525fcf976810f023d96472f414c0d5e6339b +refs/heads/master: d6ceb25e8d8bccf826848c2621a50d02c0a7f4ae diff --git a/trunk/block/cfq-iosched.c b/trunk/block/cfq-iosched.c index cba8a5d91bfa..56e9d8503cf1 100644 --- a/trunk/block/cfq-iosched.c +++ b/trunk/block/cfq-iosched.c @@ -1903,10 +1903,17 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, * Remember that we saw a request from this process, but * don't start queuing just yet. Otherwise we risk seeing lots * of tiny requests, because we disrupt the normal plugging - * and merging. + * and merging. If the request is already larger than a single + * page, let it rip immediately. For that case we assume that + * merging is already done. */ - if (cfq_cfqq_wait_request(cfqq)) + if (cfq_cfqq_wait_request(cfqq)) { + if (blk_rq_bytes(rq) > PAGE_CACHE_SIZE) { + del_timer(&cfqd->idle_slice_timer); + blk_start_queueing(cfqd->queue); + } cfq_mark_cfqq_must_dispatch(cfqq); + } } else if (cfq_should_preempt(cfqd, cfqq, rq)) { /* * not the active queue - expire current slice if it is