From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Cc: dm-devel@redhat.com, linux-block@vger.kernel.org,
linux-nvme@lists.infradead.org, axboe@kernel.dk, agk@redhat.com,
snitzer@redhat.com, kbusch@kernel.org, hch@lst.de,
rostedt@goodmis.org, mingo@redhat.com, rdunlap@infradead.org
Subject: Re: [PATCH RFC] block: blktrace framework cleanup
Date: Wed, 24 Jun 2020 08:48:20 +0200 [thread overview]
Message-ID: <20200624064820.GA17964@lst.de> (raw)
In-Reply-To: <20200624032752.4177-1-chaitanya.kulkarni@wdc.com>
On Tue, Jun 23, 2020 at 08:27:52PM -0700, Chaitanya Kulkarni wrote:
> There are many places where trace API accepts the struct request_queue*
> parameter which can be derived from other function parameters.
>
> This patch removes the struct request queue parameter from the
> blktrace framework and adjusts the tracepoints definition and usage
> along with the tracing API itself.
Good idea, and I had a half-ready patch for this already as well.
One issue, and two extra requests below:
> if (bio->bi_disk && bio_flagged(bio, BIO_TRACE_COMPLETION)) {
> - trace_block_bio_complete(bio->bi_disk->queue, bio);
> + trace_block_bio_complete(bio);
This one can also be called for a different queue than
bio->bi_disk->queue, so for this one particular tracepoint we'll need
to keep the request_queue argument.
> diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
> index fdcc2c1dd178..a3cade16ef80 100644
> --- a/block/blk-mq-sched.c
> +++ b/block/blk-mq-sched.c
> @@ -409,7 +409,7 @@ EXPORT_SYMBOL_GPL(blk_mq_sched_try_insert_merge);
>
> void blk_mq_sched_request_inserted(struct request *rq)
> {
> - trace_block_rq_insert(rq->q, rq);
> + trace_block_rq_insert(rq);
> }
> EXPORT_SYMBOL_GPL(blk_mq_sched_request_inserted);
As a follow on patch we should also remove this function.
> }
>
> spin_lock(&ctx->lock);
> @@ -2111,7 +2111,7 @@ blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
> goto queue_exit;
> }
>
> - trace_block_getrq(q, bio, bio->bi_opf);
> + trace_block_getrq(bio, bio->bi_opf);
The second argument can be removed as well. Maybe as another patch.
next prev parent reply other threads:[~2020-06-24 6:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 3:27 [PATCH RFC] block: blktrace framework cleanup Chaitanya Kulkarni
2020-06-24 6:48 ` Christoph Hellwig [this message]
2020-06-24 22:45 ` 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=20200624064820.GA17964@lst.de \
--to=hch@lst.de \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=chaitanya.kulkarni@wdc.com \
--cc=dm-devel@redhat.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mingo@redhat.com \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=snitzer@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).