linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kyber: make trace_block_rq call consistent with documentation
       [not found] <CGME20210804194924uscas1p2922dc9e7bb44fbfa10abe8157fdd43e1@uscas1p2.samsung.com>
@ 2021-08-04 19:49 ` Vincent Fu
  2021-08-05 20:31   ` Adam Manzanares
  2021-08-06 22:40   ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Vincent Fu @ 2021-08-04 19:49 UTC (permalink / raw)
  To: axboe, linux-block; +Cc: Vincent Fu

The kyber ioscheduler calls trace_block_rq_insert() *after* the request
is added to the queue but the documentation for trace_block_rq_insert()
says that the call should be made *before* the request is added to the
queue.  Move the tracepoint for the kyber ioscheduler so that it is
consistent with the documentation.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
---
 block/kyber-iosched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c
index 81e3279ec..15a8be572 100644
--- a/block/kyber-iosched.c
+++ b/block/kyber-iosched.c
@@ -596,13 +596,13 @@ static void kyber_insert_requests(struct blk_mq_hw_ctx *hctx,
 		struct list_head *head = &kcq->rq_list[sched_domain];
 
 		spin_lock(&kcq->lock);
+		trace_block_rq_insert(rq);
 		if (at_head)
 			list_move(&rq->queuelist, head);
 		else
 			list_move_tail(&rq->queuelist, head);
 		sbitmap_set_bit(&khd->kcq_map[sched_domain],
 				rq->mq_ctx->index_hw[hctx->type]);
-		trace_block_rq_insert(rq);
 		spin_unlock(&kcq->lock);
 	}
 }
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kyber: make trace_block_rq call consistent with documentation
  2021-08-04 19:49 ` [PATCH] kyber: make trace_block_rq call consistent with documentation Vincent Fu
@ 2021-08-05 20:31   ` Adam Manzanares
  2021-08-06 22:40   ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Adam Manzanares @ 2021-08-05 20:31 UTC (permalink / raw)
  To: Vincent Fu; +Cc: axboe, linux-block

On Wed, Aug 04, 2021 at 07:49:23PM +0000, Vincent Fu wrote:
> The kyber ioscheduler calls trace_block_rq_insert() *after* the request
> is added to the queue but the documentation for trace_block_rq_insert()
> says that the call should be made *before* the request is added to the
> queue.  Move the tracepoint for the kyber ioscheduler so that it is
> consistent with the documentation.
> 
> Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
> ---
>  block/kyber-iosched.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c
> index 81e3279ec..15a8be572 100644
> --- a/block/kyber-iosched.c
> +++ b/block/kyber-iosched.c
> @@ -596,13 +596,13 @@ static void kyber_insert_requests(struct blk_mq_hw_ctx *hctx,
>  		struct list_head *head = &kcq->rq_list[sched_domain];
>  
>  		spin_lock(&kcq->lock);
> +		trace_block_rq_insert(rq);
>  		if (at_head)
>  			list_move(&rq->queuelist, head);
>  		else
>  			list_move_tail(&rq->queuelist, head);
>  		sbitmap_set_bit(&khd->kcq_map[sched_domain],
>  				rq->mq_ctx->index_hw[hctx->type]);
> -		trace_block_rq_insert(rq);
>  		spin_unlock(&kcq->lock);
>  	}
>  }
> -- 
> 2.25.1

Looks good.

Reviewed by: Adam Manzanares <a.manzanares@samsung.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kyber: make trace_block_rq call consistent with documentation
  2021-08-04 19:49 ` [PATCH] kyber: make trace_block_rq call consistent with documentation Vincent Fu
  2021-08-05 20:31   ` Adam Manzanares
@ 2021-08-06 22:40   ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2021-08-06 22:40 UTC (permalink / raw)
  To: Vincent Fu, linux-block

On 8/4/21 1:49 PM, Vincent Fu wrote:
> The kyber ioscheduler calls trace_block_rq_insert() *after* the request
> is added to the queue but the documentation for trace_block_rq_insert()
> says that the call should be made *before* the request is added to the
> queue.  Move the tracepoint for the kyber ioscheduler so that it is
> consistent with the documentation.

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-06 22:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20210804194924uscas1p2922dc9e7bb44fbfa10abe8157fdd43e1@uscas1p2.samsung.com>
2021-08-04 19:49 ` [PATCH] kyber: make trace_block_rq call consistent with documentation Vincent Fu
2021-08-05 20:31   ` Adam Manzanares
2021-08-06 22:40   ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).