diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-04-06 08:48:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-06 11:04:53 -0400 |
commit | 1faa16d22877f4839bd433547d770c676d1d964c (patch) | |
tree | 9a0d50be1ef0358c1f53d7107413100904e7d526 /block/elevator.c | |
parent | 0221c81b1b8eb0cbb6b30a0ced52ead32d2b4e4c (diff) |
block: change the request allocation/congestion logic to be sync/async based
This makes sure that we never wait on async IO for sync requests, instead
of doing the split on writes vs reads.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c index 98259eda0ef6..ca6788a0195a 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -677,7 +677,7 @@ void elv_insert(struct request_queue *q, struct request *rq, int where) | |||
677 | } | 677 | } |
678 | 678 | ||
679 | if (unplug_it && blk_queue_plugged(q)) { | 679 | if (unplug_it && blk_queue_plugged(q)) { |
680 | int nrq = q->rq.count[READ] + q->rq.count[WRITE] | 680 | int nrq = q->rq.count[BLK_RW_SYNC] + q->rq.count[BLK_RW_ASYNC] |
681 | - q->in_flight; | 681 | - q->in_flight; |
682 | 682 | ||
683 | if (nrq >= q->unplug_thresh) | 683 | if (nrq >= q->unplug_thresh) |