[PATCH 0/2] percpu_ref & block: reduce memory footprint of percpu_ref in fast path

From: Ming Lei
Date: Tue Aug 25 2020 - 06:13:12 EST


Hi,

The 1st patch removes memory footprint of percpu_ref in fast path
from 7 words to 2 words, since it is often used in fast path and
embedded in user struct.

The 2nd patch moves .q_usage_counter to 1st cacheline of
'request_queue'.

Simple test on null_blk shows ~2% IOPS boost on one 16cores(two threads
per core) machine, dual socket/numa.


Ming Lei (2):
percpu_ref: reduce memory footprint of percpu_ref in fast path
block: move 'q_usage_counter' into front of 'request_queue'

drivers/infiniband/sw/rdmavt/mr.c | 2 +-
include/linux/blkdev.h | 3 +-
include/linux/percpu-refcount.h | 43 +++++++++----
lib/percpu-refcount.c | 101 ++++++++++++++++++++----------
4 files changed, 101 insertions(+), 48 deletions(-)

Cc: Sagi Grimberg <sagi@xxxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: Jens Axboe <axboe@xxxxxxxxx>
Cc: Bart Van Assche <bvanassche@xxxxxxx>
--
2.25.2