]> git.baikalelectronics.ru Git - kernel.git/commit
blk-stat: Optimise blk_stat_add()
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 7 Oct 2019 21:16:51 +0000 (00:16 +0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 Oct 2019 03:19:10 +0000 (21:19 -0600)
commitde493c0576422dcec534b279dc50a73d0a739be4
tree2f9511fed5b78056a63ea1c8104e27f79f69823a
parent7e56019d5d3546a5500088648827f99ce15d8964
blk-stat: Optimise blk_stat_add()

blk_stat_add() calls {get,put}_cpu_ptr() in a loop, which entails
overhead of disabling/enabling preemption. The loop is under RCU
(i.e.short) anyway, so do get_cpu() in advance.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-stat.c