Re: [PATCH 1/2] block: add blk_time_get_ns() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux