summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-10-17 13:58:29 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-12-03 13:03:56 +0100
commit5d89139ffa484aff47a7b69db520b9bbd9d2d191 (patch)
treed11c023547cfe7b746485a20b840b95368c65bfa /block
parent052d6b58278a1425dfe9c523d647a105a8436cb2 (diff)
block: don't use plugging on SSD devices
We just want to hand the first bits of IO to the device as fast as possible. Gains a few percent on the IOPS rate. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index cc8364231a3d..953bec0295dd 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -254,8 +254,7 @@ void __generic_unplug_device(struct request_queue *q)
{
if (unlikely(blk_queue_stopped(q)))
return;
-
- if (!blk_remove_plug(q))
+ if (!blk_remove_plug(q) && !blk_queue_nonrot(q))
return;
q->request_fn(q);
@@ -1233,11 +1232,11 @@ get_rq:
if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) ||
bio_flagged(bio, BIO_CPU_AFFINE))
req->cpu = blk_cpu_to_group(smp_processor_id());
- if (elv_queue_empty(q))
+ if (!blk_queue_nonrot(q) && elv_queue_empty(q))
blk_plug_device(q);
add_request(q, req);
out:
- if (sync)
+ if (sync || blk_queue_nonrot(q))
__generic_unplug_device(q);
spin_unlock_irq(q->queue_lock);
return 0;