Hi,
在 2024/01/16 5:53, Jens Axboe 写道:
@@ -2810,7 +2810,7 @@ static void ioc_rqos_done(struct rq_qos *rqos, struct request *rq)
return;
}
- on_q_ns = ktime_get_ns() - rq->alloc_time_ns;
+ on_q_ns = blk_time_get_ns() - rq->alloc_time_ns;
Just notice that this is from io completion path, and the same as
blk_account_io_done(), where plug does not exist. Hence ktime_get_ns()
will still be called multiple times after patch 2.
Do you think will this worth to be optimized? For example, add a new
field in request so that each rq completion will only call
ktime_get_ns() once. Furthermore, we can optimize io_tices precision
from jiffies to ns.
Thanks,
Kuai