Skip to content
Commit 6e2fa4dd authored by Hongnan Li's avatar Hongnan Li Committed by Jens Axboe
Browse files

blk-iolatency: only call ktime_get() if needed



ktime_to_ns(ktime_get()), which is expensive, does not need to be called
if blk_iolatency_enabled() return false in blkcg_iolatency_done_bio().
Postponing ktime_to_ns(ktime_get()) execution reduces the CPU usage when
blk_iolatency is disabled.

Signed-off-by: default avatarHongnan Li <hongnan.li@linux.alibaba.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 5a6c35f9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment