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>
This commit is contained in:
parent
a185eb4bc8
commit
a31a97381c
1 changed files with 3 additions and 4 deletions
|
@ -268,8 +268,7 @@ void __generic_unplug_device(struct request_queue *q)
|
||||||
{
|
{
|
||||||
if (unlikely(blk_queue_stopped(q)))
|
if (unlikely(blk_queue_stopped(q)))
|
||||||
return;
|
return;
|
||||||
|
if (!blk_remove_plug(q) && !blk_queue_nonrot(q))
|
||||||
if (!blk_remove_plug(q))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
q->request_fn(q);
|
q->request_fn(q);
|
||||||
|
@ -1241,11 +1240,11 @@ static int __make_request(struct request_queue *q, struct bio *bio)
|
||||||
if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) ||
|
if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) ||
|
||||||
bio_flagged(bio, BIO_CPU_AFFINE))
|
bio_flagged(bio, BIO_CPU_AFFINE))
|
||||||
req->cpu = blk_cpu_to_group(smp_processor_id());
|
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);
|
blk_plug_device(q);
|
||||||
add_request(q, req);
|
add_request(q, req);
|
||||||
out:
|
out:
|
||||||
if (sync)
|
if (sync || blk_queue_nonrot(q))
|
||||||
__generic_unplug_device(q);
|
__generic_unplug_device(q);
|
||||||
spin_unlock_irq(q->queue_lock);
|
spin_unlock_irq(q->queue_lock);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue