summaryrefslogtreecommitdiff
path: root/lib/muldi3.c
diff options
context:
space:
mode:
authorChengming Zhou <zhouchengming@bytedance.com>2023-07-10 18:55:16 +0800
committerJens Axboe <axboe@kernel.dk>2023-07-13 12:30:57 -0600
commit5c17f45e91f5035c1b317e93b3dfb01088ac2902 (patch)
tree33c385419f3233458d644fa56fdbcb0cab72d605 /lib/muldi3.c
parentf673b4f5bd13365c8bee2f38c9794b635c73a302 (diff)
blk-mq: fix start_time_ns and alloc_time_ns for pre-allocated rq
The iocost rely on rq start_time_ns and alloc_time_ns to tell saturation state of the block device. Most of the time request is allocated after rq_qos_throttle() and its alloc_time_ns or start_time_ns won't be affected. But for plug batched allocation introduced by the commit 47c122e35d7e ("block: pre-allocate requests if plug is started and is a batch"), we can rq_qos_throttle() after the allocation of the request. This is what the blk_mq_get_cached_request() does. In this case, the cached request alloc_time_ns or start_time_ns is much ahead if blocked in any qos ->throttle(). Fix it by setting alloc_time_ns and start_time_ns to now when the allocated request is actually used. Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com> Acked-by: Tejun Heo <tj@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20230710105516.2053478-1-chengming.zhou@linux.dev Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/muldi3.c')
0 files changed, 0 insertions, 0 deletions