From: Chetan Loke <loke.chetan@gmail.com>
To: Paul.Clements@steeleye.com, axboe@kernel.dk,
linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, Chetan Loke <loke.chetan@gmail.com>
Subject: [PATCH 1/1] block/nbd: micro-optimization in nbd request completion
Date: Wed, 6 Jun 2012 10:15:16 -0400 [thread overview]
Message-ID: <1338992116-28094-1-git-send-email-loke.chetan@gmail.com> (raw)
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>
---
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 061427a..8957b9f 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)
nbd_end_request(req);
} else {
spin_lock(&nbd->queue_lock);
- list_add(&req->queuelist, &nbd->queue_head);
+ list_add_tail(&req->queuelist, &nbd->queue_head);
spin_unlock(&nbd->queue_lock);
}
--
1.7.5.2
next reply other threads:[~2012-06-06 14:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 14:15 Chetan Loke [this message]
2012-06-06 17:20 ` [PATCH 1/1] block/nbd: micro-optimization in nbd request completion Paul Clements
2012-07-30 15:02 ` chetan loke
2012-07-31 6:47 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1338992116-28094-1-git-send-email-loke.chetan@gmail.com \
--to=loke.chetan@gmail.com \
--cc=Paul.Clements@steeleye.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox