Commit 4c5d0bbd authored by Andrew Morton's avatar Andrew Morton Committed by Jens Axboe

[PATCH] blk_execute_rq_nowait-speedup

Both elv_add_request() and generic_unplug_device() grab the queue lock
and disable interrupts, do that locally and use the __ variants.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
parent b8fca1c7
...@@ -2477,10 +2477,12 @@ void blk_execute_rq_nowait(request_queue_t *q, struct gendisk *bd_disk, ...@@ -2477,10 +2477,12 @@ void blk_execute_rq_nowait(request_queue_t *q, struct gendisk *bd_disk,
rq->rq_disk = bd_disk; rq->rq_disk = bd_disk;
rq->flags |= REQ_NOMERGE; rq->flags |= REQ_NOMERGE;
rq->end_io = done; rq->end_io = done;
elv_add_request(q, rq, where, 1); WARN_ON(irqs_disabled());
generic_unplug_device(q); spin_lock_irq(q->queue_lock);
__elv_add_request(q, rq, where, 1);
__generic_unplug_device(q);
spin_unlock_irq(q->queue_lock);
} }
EXPORT_SYMBOL_GPL(blk_execute_rq_nowait); EXPORT_SYMBOL_GPL(blk_execute_rq_nowait);
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment