aboutsummaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-16 01:19:52 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-16 01:19:52 +0100
commit18594822fcb01d4b35e05b9018f770a0b4156d1a (patch)
tree38d35c38086a564beaac215f8e52694cdbfab1c3 /block/elevator.c
parent[PATCH] jffs2: memory leak in jffs2_scan_medium() (diff)
parent[PATCH] dl2k needs dma-mapping.h (diff)
downloadlinux-dev-18594822fcb01d4b35e05b9018f770a0b4156d1a.tar.xz
linux-dev-18594822fcb01d4b35e05b9018f770a0b4156d1a.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 29825792cbd5..8768a367fdde 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -333,6 +333,7 @@ void elv_insert(request_queue_t *q, struct request *rq, int where)
{
struct list_head *pos;
unsigned ordseq;
+ int unplug_it = 1;
blk_add_trace_rq(q, rq, BLK_TA_INSERT);
@@ -399,6 +400,11 @@ void elv_insert(request_queue_t *q, struct request *rq, int where)
}
list_add_tail(&rq->queuelist, pos);
+ /*
+ * most requeues happen because of a busy condition, don't
+ * force unplug of the queue for that case.
+ */
+ unplug_it = 0;
break;
default:
@@ -407,7 +413,7 @@ void elv_insert(request_queue_t *q, struct request *rq, int where)
BUG();
}
- if (blk_queue_plugged(q)) {
+ if (unplug_it && blk_queue_plugged(q)) {
int nrq = q->rq.count[READ] + q->rq.count[WRITE]
- q->in_flight;