From: chengming.zhou@linux.dev
To: axboe@kernel.dk, ming.lei@redhat.com, hch@lst.de, tj@kernel.org
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Chengming Zhou <zhouchengming@bytedance.com>
Subject: [PATCH v4 0/2] blk-mq: fix start_time_ns and alloc_time_ns for pre-allocated rq
Date: Thu, 29 Jun 2023 20:13:00 +0800 [thread overview]
Message-ID: <20230629121302.1124851-1-chengming.zhou@linux.dev> (raw)
From: Chengming Zhou <zhouchengming@bytedance.com>
Hello,
This patchset fix start_time_ns and alloc_time_ns for pre-allocated rq.
patch 1 is preparation that we move data->rq_flags initialization code
outside blk_mq_rq_ctx_init() to its caller, since we will need it to
tell if we need to get start_time_ns.
patch 2 is the fix patch that we set alloc_time_ns and start_time_ns
to now when the pre-allocated rq is actually used and we skip setting
during pre-allocation.
v4:
- Combine the last two patches into one patch for clearer review.
- Use blk_mq_alloc_data to pass start_time_ns instead of passing down
yet another parameter. Thanks Christoph Hellwig.
- [v3] https://lore.kernel.org/all/20230628124546.1056698-1-chengming.zhou@linux.dev/
v3:
- Skip setting the alloc_time_ns and start_time_ns during pre-allocation,
which is clearer, as suggested by Tejun.
- [v2] https://lore.kernel.org/all/20230626050405.781253-1-chengming.zhou@linux.dev/
v2:
- Let blk_mq_rq_ctx_init() receive start_time_ns for batched time setting.
- Set alloc_time_ns and start_time_ns when the pre-allocated rq is actually
used, as suggested by Tejun.
- [v1] https://lore.kernel.org/all/20230601053919.3639954-1-chengming.zhou@linux.dev/
Chengming Zhou (2):
blk-mq: move data->rq_flags initialization code
blk-mq: fix start_time_ns and alloc_time_ns for pre-allocated rq
block/blk-mq.c | 87 ++++++++++++++++++++++++------------------
block/blk-mq.h | 1 +
include/linux/blk-mq.h | 6 +--
3 files changed, 53 insertions(+), 41 deletions(-)
--
2.39.2
next reply other threads:[~2023-06-29 12:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 12:13 chengming.zhou [this message]
2023-06-29 12:13 ` [PATCH v4 1/2] blk-mq: move data->rq_flags initialization code chengming.zhou
2023-06-29 12:13 ` [PATCH v4 2/2] blk-mq: fix start_time_ns and alloc_time_ns for pre-allocated rq chengming.zhou
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=20230629121302.1124851-1-chengming.zhou@linux.dev \
--to=chengming.zhou@linux.dev \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=tj@kernel.org \
--cc=zhouchengming@bytedance.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
all inboxes | Powered by JetHome®