public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] blk-mq: fix start_time_ns and alloc_time_ns for pre-allocated rq
@ 2023-06-28 12:45 chengming.zhou
  2023-06-28 12:45 ` [PATCH v3 1/3] blk-mq: always use __blk_mq_alloc_requests() to alloc and init rq chengming.zhou
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: chengming.zhou @ 2023-06-28 12:45 UTC (permalink / raw)
  To: axboe, tj; +Cc: linux-block, linux-kernel, zhouchengming, ming.lei, hch

From: Chengming Zhou <zhouchengming@bytedance.com>

Hello,

This patchset fix start_time_ns and alloc_time_ns for pre-allocated rq.

patch 1 and 2 is preparation that we ktime_get_ns() outside batched rq init
for batched requests start_time_ns setting.

patch 3 is the fix patch that we set alloc_time_ns and start_time_ns
to now when the pre-allocated rq is actually used.

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 (3):
  blk-mq: always use __blk_mq_alloc_requests() to alloc and init rq
  blk-mq: ktime_get_ns() only once for batched requests init
  blk-mq: fix start_time_ns and alloc_time_ns for pre-allocated rq

 block/blk-mq.c         | 94 ++++++++++++++++++++++++------------------
 include/linux/blk-mq.h |  6 +--
 2 files changed, 56 insertions(+), 44 deletions(-)

-- 
2.39.2


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

end of thread, other threads:[~2023-07-10 11:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-28 12:45 [PATCH v3 0/3] blk-mq: fix start_time_ns and alloc_time_ns for pre-allocated rq chengming.zhou
2023-06-28 12:45 ` [PATCH v3 1/3] blk-mq: always use __blk_mq_alloc_requests() to alloc and init rq chengming.zhou
2023-06-29  5:28   ` Christoph Hellwig
2023-06-29  7:40     ` Chengming Zhou
2023-07-10  7:36       ` Christoph Hellwig
2023-07-10 11:07         ` Chengming Zhou
2023-06-28 12:45 ` [PATCH v3 2/3] blk-mq: ktime_get_ns() only once for batched requests init chengming.zhou
2023-06-29  5:30   ` Christoph Hellwig
2023-06-29  6:44     ` Chengming Zhou
2023-06-28 12:45 ` [PATCH v3 3/3] blk-mq: fix start_time_ns and alloc_time_ns for pre-allocated rq chengming.zhou
     [not found]   ` <1bf88665-f779-7d45-1d5f-1af05aeb0882@web.de>
2023-06-29  4:58     ` Christoph Hellwig
2023-06-29  5:32   ` Christoph Hellwig
2023-06-29  6:42     ` Chengming Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox