diff options
author | Hongnan Li <hongnan.li@linux.alibaba.com> | 2020-07-01 16:09:38 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-07-01 08:02:38 -0600 |
commit | 6e2fa4dd683a22a7697e7ff51dad499406094d28 (patch) | |
tree | 2d90f66acae2e7111558a25e587b93cbae0dfd4e /drivers/block | |
parent | 5a6c35f9af416114588298aa7a90b15bbed15a41 (diff) | |
download | lwn-6e2fa4dd683a22a7697e7ff51dad499406094d28.tar.gz lwn-6e2fa4dd683a22a7697e7ff51dad499406094d28.zip |
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: Hongnan Li <hongnan.li@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
0 files changed, 0 insertions, 0 deletions