Skip to content

Commit

Permalink
[PATCH] blk_execute_rq_nowait-speedup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Jens Axboe committed Mar 27, 2006
1 parent b8fca1c commit 4c5d0bb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
Expand Down

0 comments on commit 4c5d0bb

Please sign in to comment.