All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org
Cc: paolo.valente@linaro.org, axboe@kernel.dk, rostedt@goodmis.org,
	mingo@redhat.com, chaitanya.kulkarni@wdc.com,
	johannes.thumshirn@wdc.com, damien.lemoal@wdc.com,
	bvanassche@acm.org, dongli.zhang@oracle.com,
	akpm@linux-foundation.org, aravind.ramesh@wdc.com,
	joshi.k@samsung.com, niklas.cassel@wdc.com, hare@suse.de,
	colyli@suse.de, tj@kernel.org, rdunlap@infradead.org,
	jack@suse.cz, hch@lst.de
Subject: [PATCH 5/7] block: get rid of the trace rq insert wrapper
Date: Mon,  1 Feb 2021 21:25:34 -0800	[thread overview]
Message-ID: <20210202052544.4108-6-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20210202052544.4108-1-chaitanya.kulkarni@wdc.com>

Get rid of the wrapper for trace_block_rq_insert() and call the function
directly.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 block/bfq-iosched.c     | 4 +++-
 block/blk-mq-sched.c    | 6 ------
 block/blk-mq-sched.h    | 1 -
 block/kyber-iosched.c   | 4 +++-
 block/mq-deadline.c     | 4 +++-
 kernel/trace/blktrace.c | 1 +
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index dfa87e360d71..da5e1f620625 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -125,6 +125,8 @@
 #include <linux/delay.h>
 #include <linux/backing-dev.h>
 
+#include <trace/events/block.h>
+
 #include "blk.h"
 #include "blk-mq.h"
 #include "blk-mq-tag.h"
@@ -5621,7 +5623,7 @@ static void bfq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
 
 	spin_unlock_irq(&bfqd->lock);
 
-	blk_mq_sched_request_inserted(rq);
+	trace_block_rq_insert(rq);
 
 	spin_lock_irq(&bfqd->lock);
 	bfqq = bfq_init_rq(rq);
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index deff4e826e23..ddb65e9e6fd9 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -384,12 +384,6 @@ bool blk_mq_sched_try_insert_merge(struct request_queue *q, struct request *rq)
 }
 EXPORT_SYMBOL_GPL(blk_mq_sched_try_insert_merge);
 
-void blk_mq_sched_request_inserted(struct request *rq)
-{
-	trace_block_rq_insert(rq);
-}
-EXPORT_SYMBOL_GPL(blk_mq_sched_request_inserted);
-
 static bool blk_mq_sched_bypass_insert(struct blk_mq_hw_ctx *hctx,
 				       bool has_sched,
 				       struct request *rq)
diff --git a/block/blk-mq-sched.h b/block/blk-mq-sched.h
index 0476360f05f1..5b18ab915c65 100644
--- a/block/blk-mq-sched.h
+++ b/block/blk-mq-sched.h
@@ -7,7 +7,6 @@
 
 void blk_mq_sched_assign_ioc(struct request *rq);
 
-void blk_mq_sched_request_inserted(struct request *rq);
 bool blk_mq_sched_try_merge(struct request_queue *q, struct bio *bio,
 		unsigned int nr_segs, struct request **merged_request);
 bool __blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio,
diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c
index c25c41d0d061..f13da10953bf 100644
--- a/block/kyber-iosched.c
+++ b/block/kyber-iosched.c
@@ -13,6 +13,8 @@
 #include <linux/module.h>
 #include <linux/sbitmap.h>
 
+#include <trace/events/block.h>
+
 #include "blk.h"
 #include "blk-mq.h"
 #include "blk-mq-debugfs.h"
@@ -602,7 +604,7 @@ static void kyber_insert_requests(struct blk_mq_hw_ctx *hctx,
 			list_move_tail(&rq->queuelist, head);
 		sbitmap_set_bit(&khd->kcq_map[sched_domain],
 				rq->mq_ctx->index_hw[hctx->type]);
-		blk_mq_sched_request_inserted(rq);
+		trace_block_rq_insert(rq);
 		spin_unlock(&kcq->lock);
 	}
 }
diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index b57470e154c8..f3631a287466 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -18,6 +18,8 @@
 #include <linux/rbtree.h>
 #include <linux/sbitmap.h>
 
+#include <trace/events/block.h>
+
 #include "blk.h"
 #include "blk-mq.h"
 #include "blk-mq-debugfs.h"
@@ -496,7 +498,7 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
 	if (blk_mq_sched_try_insert_merge(q, rq))
 		return;
 
-	blk_mq_sched_request_inserted(rq);
+	trace_block_rq_insert(rq);
 
 	if (at_head || blk_rq_is_passthrough(rq)) {
 		if (at_head)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 1a931afcf5c4..259635217a53 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -852,6 +852,7 @@ static void blk_add_trace_rq_issue(void *ignore, struct request *rq)
 	blk_add_trace_rq(rq, 0, blk_rq_bytes(rq), BLK_TA_ISSUE,
 			 blk_trace_request_get_cgid(rq));
 }
+EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_insert);
 
 static void blk_add_trace_rq_merge(void *ignore, struct request *rq)
 {
-- 
2.22.1


  parent reply	other threads:[~2021-02-02  5:33 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  5:25 [PATCH 0/7] blktrace: few clenaup Chaitanya Kulkarni
2021-02-02  5:25 ` [PATCH 1/7] block: remove superfluous param in blk_fill_rwbs() Chaitanya Kulkarni
2021-02-02  9:02   ` Damien Le Moal
2021-02-02  9:04   ` Damien Le Moal
2021-02-02  9:55   ` Johannes Thumshirn
2021-02-02  5:25 ` [PATCH 2/7] blktrace: add blk_fill_rwbs documentation comment Chaitanya Kulkarni
2021-02-02  9:03   ` Damien Le Moal
2021-02-02  9:55   ` Johannes Thumshirn
2021-02-02  5:25 ` [PATCH 3/7] blktrace: fix blk_rq_issue documentation Chaitanya Kulkarni
2021-02-02  9:04   ` Damien Le Moal
2021-02-02  9:56   ` Johannes Thumshirn
2021-02-02  5:25 ` [PATCH 4/7] blktrace: fix blk_rq_merge documentation Chaitanya Kulkarni
2021-02-02  9:05   ` Damien Le Moal
2021-02-02  9:57   ` Johannes Thumshirn
2021-02-02  5:25 ` Chaitanya Kulkarni [this message]
2021-02-02  9:05   ` [PATCH 5/7] block: get rid of the trace rq insert wrapper Damien Le Moal
2021-02-02  9:58   ` Johannes Thumshirn
2021-02-02  5:25 ` [PATCH 6/7] null_blk: allow disacrd on non-membacked mode Chaitanya Kulkarni
2021-02-02  9:08   ` Damien Le Moal
2021-02-02  5:25 ` [PATCH 7/7] null_blk: add module param queue bounce limit Chaitanya Kulkarni
2021-02-02  9:18   ` Damien Le Moal
2021-02-02  5:25 ` [PATCH 0/7] blktrace: few clenaup Chaitanya Kulkarni
2021-02-02  5:25 ` [PATCH 1/7] block: remove superfluous param in blk_fill_rwbs() Chaitanya Kulkarni
2021-02-02  9:34   ` Christoph Hellwig
2021-02-02  5:25 ` [PATCH 2/7] blktrace: add blk_fill_rwbs documentation comment Chaitanya Kulkarni
2021-02-02  9:34   ` Christoph Hellwig
2021-02-02  5:25 ` [PATCH 3/7] blktrace: fix blk_rq_issue documentation Chaitanya Kulkarni
2021-02-02  9:34   ` Christoph Hellwig
2021-02-02  5:25 ` [PATCH 4/7] blktrace: fix blk_rq_merge documentation Chaitanya Kulkarni
2021-02-02  9:34   ` Christoph Hellwig
2021-02-02  5:25 ` [PATCH 5/7] block: get rid of the trace rq insert wrapper Chaitanya Kulkarni
2021-02-02  9:36   ` Christoph Hellwig
2021-02-02  5:25 ` [PATCH 6/7] null_blk: allow disacrd on non-membacked mode Chaitanya Kulkarni
2021-02-02  9:36   ` Christoph Hellwig
2021-02-02 20:15     ` Chaitanya Kulkarni
2021-02-02  5:25 ` [PATCH 7/7] null_blk: add module param queue bounce limit Chaitanya Kulkarni
2021-02-02  5:29 ` [PATCH 0/7] blktrace: few clenaup Chaitanya Kulkarni

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=20210202052544.4108-6-chaitanya.kulkarni@wdc.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=akpm@linux-foundation.org \
    --cc=aravind.ramesh@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=colyli@suse.de \
    --cc=damien.lemoal@wdc.com \
    --cc=dongli.zhang@oracle.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=johannes.thumshirn@wdc.com \
    --cc=joshi.k@samsung.com \
    --cc=linux-block@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=niklas.cassel@wdc.com \
    --cc=paolo.valente@linaro.org \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.