All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next v4 0/6] implement pcpu bio caching for IRQ I/O
@ 2022-11-02 15:18 Pavel Begunkov
  2022-11-02 15:18 ` [PATCH for-next v4 1/6] mempool: introduce mempool_is_saturated Pavel Begunkov
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Pavel Begunkov @ 2022-11-02 15:18 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: kernel-team, Pavel Begunkov

Add bio pcpu caching for IRQ-driven I/O. We extend the currently limited to
iopoll REQ_ALLOC_CACHE infra. Benchmarked with t/io_uring and an Optane SSD:
2.22 -> 2.32 MIOPS for qd32 (+4.5%) and 2.60 vs 2.82 for qd128 (+8.4%).

Works best with per-cpu queues, otherwise there might be some effects at
play, e.g. bios allocated by one cpu but freed by another, but the worst
case (always goes to mempool) doesn't show any performance degradation.

Currently, it's only enabled for previous REQ_ALLOC_CACHE users but will
be turned on system-wide later.

v2: fix botched splicing threshold checks
v3: remove merged patch limit scope of flags var in bio_put_percpu_cache
v4: correct outdated comment
    fix in-irq put -> splice modifying the non-irq safe cache list
    fix alloc null dereference

Pavel Begunkov (6):
  mempool: introduce mempool_is_saturated
  bio: don't rob starving biosets of bios
  bio: split pcpu cache part of bio_put into a helper
  bio: add pcpu caching for non-polling bio_put
  bio: shrink max number of pcpu cached bios
  io_uring/rw: enable bio caches for IRQ rw

 block/bio.c             | 98 +++++++++++++++++++++++++++++++----------
 include/linux/mempool.h |  5 +++
 io_uring/rw.c           |  3 +-
 3 files changed, 82 insertions(+), 24 deletions(-)

-- 
2.38.0


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

end of thread, other threads:[~2022-11-16 18:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 15:18 [PATCH for-next v4 0/6] implement pcpu bio caching for IRQ I/O Pavel Begunkov
2022-11-02 15:18 ` [PATCH for-next v4 1/6] mempool: introduce mempool_is_saturated Pavel Begunkov
2022-11-02 15:18 ` [PATCH for-next v4 2/6] bio: don't rob starving biosets of bios Pavel Begunkov
2022-11-02 15:18 ` [PATCH for-next v4 3/6] bio: split pcpu cache part of bio_put into a helper Pavel Begunkov
2022-11-02 15:18 ` [PATCH for-next v4 4/6] bio: add pcpu caching for non-polling bio_put Pavel Begunkov
2022-11-02 15:18 ` [PATCH for-next v4 5/6] bio: shrink max number of pcpu cached bios Pavel Begunkov
2022-11-02 15:18 ` [PATCH for-next v4 6/6] io_uring/rw: enable bio caches for IRQ rw Pavel Begunkov
2022-11-16 18:49 ` [PATCH for-next v4 0/6] implement pcpu bio caching for IRQ I/O Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.