From: Andrew Morton Date: Wed, 22 Mar 2006 07:08:01 +0000 (+0100) Subject: [PATCH] blk_execute_rq_nowait-speedup X-Git-Tag: v2.6.17-rc1~276^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c5d0bbde9669cfb7f7fd4670dc9a117aea90384;p=linux-2.6 [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: Andrew Morton Signed-off-by: Jens Axboe --- diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index b836b43113..7fc903b5f3 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -2477,10 +2477,12 @@ void blk_execute_rq_nowait(request_queue_t *q, struct gendisk *bd_disk, rq->rq_disk = bd_disk; rq->flags |= REQ_NOMERGE; rq->end_io = done; - elv_add_request(q, rq, where, 1); - generic_unplug_device(q); + WARN_ON(irqs_disabled()); + 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); /**