diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-05-20 00:03:38 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-05-20 00:03:38 -0400 |
commit | badc48e6605ddeeb2484afae5993c859494decaa (patch) | |
tree | 7da638f9bb53b1812b71e40ad6deca91d59ad301 /block/elevator.c | |
parent | 753a6c4ff4c371a3e4e3408aaba4d03f3cfde73a (diff) | |
parent | 2f880b65fdbc2d4915bddc59d75a176329570fdd (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 8 |
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) | |||
333 | { | 333 | { |
334 | struct list_head *pos; | 334 | struct list_head *pos; |
335 | unsigned ordseq; | 335 | unsigned ordseq; |
336 | int unplug_it = 1; | ||
336 | 337 | ||
337 | blk_add_trace_rq(q, rq, BLK_TA_INSERT); | 338 | blk_add_trace_rq(q, rq, BLK_TA_INSERT); |
338 | 339 | ||
@@ -399,6 +400,11 @@ void elv_insert(request_queue_t *q, struct request *rq, int where) | |||
399 | } | 400 | } |
400 | 401 | ||
401 | list_add_tail(&rq->queuelist, pos); | 402 | list_add_tail(&rq->queuelist, pos); |
403 | /* | ||
404 | * most requeues happen because of a busy condition, don't | ||
405 | * force unplug of the queue for that case. | ||
406 | */ | ||
407 | unplug_it = 0; | ||
402 | break; | 408 | break; |
403 | 409 | ||
404 | default: | 410 | default: |
@@ -407,7 +413,7 @@ void elv_insert(request_queue_t *q, struct request *rq, int where) | |||
407 | BUG(); | 413 | BUG(); |
408 | } | 414 | } |
409 | 415 | ||
410 | if (blk_queue_plugged(q)) { | 416 | if (unplug_it && blk_queue_plugged(q)) { |
411 | int nrq = q->rq.count[READ] + q->rq.count[WRITE] | 417 | int nrq = q->rq.count[READ] + q->rq.count[WRITE] |
412 | - q->in_flight; | 418 | - q->in_flight; |
413 | 419 | ||