* [PATCH 1/1] block/nbd: micro-optimization in nbd request completion
@ 2012-06-06 14:15 Chetan Loke
2012-06-06 17:20 ` Paul Clements
0 siblings, 1 reply; 4+ messages in thread
From: Chetan Loke @ 2012-06-06 14:15 UTC (permalink / raw)
To: Paul.Clements, axboe, linux-kernel; +Cc: netdev, Chetan Loke
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] block/nbd: micro-optimization in nbd request completion
2012-06-06 14:15 [PATCH 1/1] block/nbd: micro-optimization in nbd request completion Chetan Loke
@ 2012-06-06 17:20 ` Paul Clements
2012-07-30 15:02 ` chetan loke
0 siblings, 1 reply; 4+ messages in thread
From: Paul Clements @ 2012-06-06 17:20 UTC (permalink / raw)
To: Chetan Loke; +Cc: axboe, linux-kernel
Makes sense. Looks good to me.
Acked-by: Paul.Clements@steeleye.com
On Wed, Jun 6, 2012 at 10:15 AM, Chetan Loke <loke.chetan@gmail.com> wrote:
>
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] block/nbd: micro-optimization in nbd request completion
2012-06-06 17:20 ` Paul Clements
@ 2012-07-30 15:02 ` chetan loke
2012-07-31 6:47 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: chetan loke @ 2012-07-30 15:02 UTC (permalink / raw)
To: paul.clements; +Cc: axboe, linux-kernel
On Wed, Jun 6, 2012 at 1:20 PM, Paul Clements
<paul.clements@steeleye.com> wrote:
> Makes sense. Looks good to me.
>
> Acked-by: Paul.Clements@steeleye.com
>
> On Wed, Jun 6, 2012 at 10:15 AM, Chetan Loke <loke.chetan@gmail.com> wrote:
>>
>> Add in-flight cmds to the tail. That way while searching(during request completion),we will always get a hit on the first element.
>>
Paul/Jens,
Looks like this one isn't merged yet.
Chetan Loke
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] block/nbd: micro-optimization in nbd request completion
2012-07-30 15:02 ` chetan loke
@ 2012-07-31 6:47 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2012-07-31 6:47 UTC (permalink / raw)
To: chetan loke; +Cc: paul.clements, linux-kernel
On 07/30/2012 05:02 PM, chetan loke wrote:
> On Wed, Jun 6, 2012 at 1:20 PM, Paul Clements
> <paul.clements@steeleye.com> wrote:
>> Makes sense. Looks good to me.
>>
>> Acked-by: Paul.Clements@steeleye.com
>>
>> On Wed, Jun 6, 2012 at 10:15 AM, Chetan Loke <loke.chetan@gmail.com> wrote:
>>>
>>> Add in-flight cmds to the tail. That way while searching(during request completion),we will always get a hit on the first element.
>>>
>
> Paul/Jens,
>
> Looks like this one isn't merged yet.
I've merged it now.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-31 6:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06 14:15 [PATCH 1/1] block/nbd: micro-optimization in nbd request completion Chetan Loke
2012-06-06 17:20 ` Paul Clements
2012-07-30 15:02 ` chetan loke
2012-07-31 6:47 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox