diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-10-21 14:30:52 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-21 08:37:26 -0600 |
commit | e94f68527a35271131cdf9d3fb4eb3c2513dc3d0 (patch) | |
tree | 19e56f1f95fc139c2be23250dbc2b65bc2a33d42 /fs/cifs/file.c | |
parent | 3b13c168186c115501ee7d194460ba2f8c825155 (diff) | |
download | linux-e94f68527a35271131cdf9d3fb4eb3c2513dc3d0.tar.bz2 |
block: kill extra rcu lock/unlock in queue enter
blk_try_enter_queue() already takes rcu_read_lock/unlock, so we can
avoid the second pair in percpu_ref_tryget_live(), use a newly added
percpu_ref_tryget_live_rcu().
As rcu_read_lock/unlock imply barrier()s, it's pretty noticeable,
especially for for !CONFIG_PREEMPT_RCU (default for some distributions),
where __rcu_read_lock/unlock() are not inlined.
3.20% io_uring [kernel.vmlinux] [k] __rcu_read_unlock
3.05% io_uring [kernel.vmlinux] [k] __rcu_read_lock
2.52% io_uring [kernel.vmlinux] [k] __rcu_read_unlock
2.28% io_uring [kernel.vmlinux] [k] __rcu_read_lock
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/6b11c67ea495ed9d44f067622d852de4a510ce65.1634822969.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/cifs/file.c')
0 files changed, 0 insertions, 0 deletions