linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] optimise blk_try_enter_queue()
@ 2021-10-21 13:30 Pavel Begunkov
  2021-10-21 13:30 ` [PATCH v2 1/2] percpu_ref: percpu_ref_tryget_live() version holding RCU Pavel Begunkov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pavel Begunkov @ 2021-10-21 13:30 UTC (permalink / raw)
  To: linux-block
  Cc: Jens Axboe, linux-kernel, linux-mm, Christoph Lameter, Tejun Heo,
	Dennis Zhou, Pavel Begunkov

Kill extra rcu_read_lock/unlock() pair in blk_try_enter_queue().
Testing with io_uring (high batching) with nullblk:

Before:
3.20%  io_uring  [kernel.vmlinux]  [k] __rcu_read_unlock
3.05%  io_uring  [kernel.vmlinux]  [k] __rcu_read_lock

After:
2.52%  io_uring  [kernel.vmlinux]  [k] __rcu_read_unlock
2.28%  io_uring  [kernel.vmlinux]  [k] __rcu_read_lock

Doesn't necessarily translates into 1.4% perfofrmance improvement
but nice to have.

v2: rcu_read_lock_held() warning (Tejun)

Pavel Begunkov (2):
  percpu_ref: percpu_ref_tryget_live() version holding RCU
  block: kill extra rcu lock/unlock in queue enter

 block/blk-core.c                |  2 +-
 include/linux/percpu-refcount.h | 33 +++++++++++++++++++++++----------
 2 files changed, 24 insertions(+), 11 deletions(-)

-- 
2.33.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-22 19:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 13:30 [PATCH v2 0/2] optimise blk_try_enter_queue() Pavel Begunkov
2021-10-21 13:30 ` [PATCH v2 1/2] percpu_ref: percpu_ref_tryget_live() version holding RCU Pavel Begunkov
2021-10-21 14:01   ` Dennis Zhou
2021-10-22  9:22     ` Pavel Begunkov
2021-10-22 19:22       ` Dennis Zhou
2021-10-21 13:30 ` [PATCH v2 2/2] block: kill extra rcu lock/unlock in queue enter Pavel Begunkov
2021-10-21 14:37 ` [PATCH v2 0/2] optimise blk_try_enter_queue() Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).