diff options
author | Andrew Morton <akpm@osdl.org> | 2006-03-22 02:08:01 -0500 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-03-27 02:29:02 -0500 |
commit | 4c5d0bbde9669cfb7f7fd4670dc9a117aea90384 (patch) | |
tree | 1c118a45803e81ab6bd1a049273b3971b46bb3cd | |
parent | b8fca1c7682105c843319728d8e37b42b19092bb (diff) |
[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 <akpm@osdl.org>
Signed-off-by: Jens Axboe <axboe@suse.de>
-rw-r--r-- | block/ll_rw_blk.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index b836b43113da..7fc903b5f3cd 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, | |||
2477 | rq->rq_disk = bd_disk; | 2477 | rq->rq_disk = bd_disk; |
2478 | rq->flags |= REQ_NOMERGE; | 2478 | rq->flags |= REQ_NOMERGE; |
2479 | rq->end_io = done; | 2479 | rq->end_io = done; |
2480 | elv_add_request(q, rq, where, 1); | 2480 | WARN_ON(irqs_disabled()); |
2481 | generic_unplug_device(q); | 2481 | spin_lock_irq(q->queue_lock); |
2482 | __elv_add_request(q, rq, where, 1); | ||
2483 | __generic_unplug_device(q); | ||
2484 | spin_unlock_irq(q->queue_lock); | ||
2482 | } | 2485 | } |
2483 | |||
2484 | EXPORT_SYMBOL_GPL(blk_execute_rq_nowait); | 2486 | EXPORT_SYMBOL_GPL(blk_execute_rq_nowait); |
2485 | 2487 | ||
2486 | /** | 2488 | /** |