]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
block: move queue run on unplug to kblockd
authorJens Axboe <jaxboe@fusionio.com>
Tue, 12 Apr 2011 12:58:51 +0000 (14:58 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Tue, 12 Apr 2011 12:58:51 +0000 (14:58 +0200)
There are worries that we are now consuming a lot more stack in
some cases, since we potentially call into IO dispatch from
schedule() or io_schedule(). We can reduce this problem by moving
the running of the queue to kblockd, like the old plugging scheme
did as well.

This may or may not be a good idea from a performance perspective,
depending on how many tasks have queue plugs running at the same
time. For even the slightly contended case, doing just a single
queue run from kblockd instead of multiple runs directly from the
unpluggers will be faster.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/blk-core.c

index c6eaa1f5646656452355ee86ef8396e608584ad0..36b1a7559f9436e2b0516dfb26ccd5e5873795c4 100644 (file)
@@ -2665,7 +2665,7 @@ static int plug_rq_cmp(void *priv, struct list_head *a, struct list_head *b)
 static void queue_unplugged(struct request_queue *q, unsigned int depth)
 {
        trace_block_unplug_io(q, depth);
-       __blk_run_queue(q, false);
+       __blk_run_queue(q, true);
 
        if (q->unplugged_fn)
                q->unplugged_fn(q);