diff options
author | Chetan Loke <loke.chetan@gmail.com> | 2012-07-31 02:47:13 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-07-31 02:47:13 -0400 |
commit | 01ff5dbc0925d11c8ad76eed3bdd02d0c7e1e0f5 (patch) | |
tree | 962e8fd1136191e31502dbe5e136b6900a3b2012 /drivers/block | |
parent | 72ea1f74fcdf874cca6d2c0962379523bbd99e2c (diff) |
block/nbd: micro-optimization in nbd request completion
Add in-flight cmds to the tail. That way while searching
(during request completion),we will always get a hit on the
first element.
Signed-off-by: Chetan Loke <loke.chetan@gmail.com>
Acked-by: Paul.Clements@steeleye.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/nbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 061427a75d37..8957b9f0cfad 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -481,7 +481,7 @@ static void nbd_handle_req(struct nbd_device *nbd, struct request *req) | |||
481 | nbd_end_request(req); | 481 | nbd_end_request(req); |
482 | } else { | 482 | } else { |
483 | spin_lock(&nbd->queue_lock); | 483 | spin_lock(&nbd->queue_lock); |
484 | list_add(&req->queuelist, &nbd->queue_head); | 484 | list_add_tail(&req->queuelist, &nbd->queue_head); |
485 | spin_unlock(&nbd->queue_lock); | 485 | spin_unlock(&nbd->queue_lock); |
486 | } | 486 | } |
487 | 487 | ||