All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 0/3] percpu_ref & block: reduce memory footprint of percpu_ref in fast path
@ 2020-09-08  1:23 Ming Lei
  2020-09-08  1:23 ` [PATCH V3 1/3] percpu_ref: add percpu_ref_inited() for MD Ming Lei
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ming Lei @ 2020-09-08  1:23 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, Ming Lei, Veronika Kabatova, Sagi Grimberg,
	Tejun Heo, Christoph Hellwig, Bart Van Assche

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.

V3:
	- fix kernel oops on MD
	- add patch for avoiding to use percpu-refcount internal from md
	  code
	- pass Red Hat CKI test which is done by Veronika Kabatova

V2:
	- pass 'gfp' to kzalloc() for fixing block/027 failure reported by
	kernel test robot
	- protect percpu_ref_is_zero() with destroying percpu-refcount by
	spin lock  

Ming Lei (3):
  percpu_ref: add percpu_ref_inited() for MD
  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 +-
 drivers/md/md.c                   |   2 +-
 include/linux/blkdev.h            |   3 +-
 include/linux/percpu-refcount.h   |  46 ++++------
 lib/percpu-refcount.c             | 137 +++++++++++++++++++++++-------
 5 files changed, 126 insertions(+), 64 deletions(-)

Cc: Veronika Kabatova <vkabatov@redhat.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Tejun Heo <tj@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Bart Van Assche <bvanassche@acm.org>
-- 
2.25.2


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

end of thread, other threads:[~2020-09-09  6:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-08  1:23 [PATCH V3 0/3] percpu_ref & block: reduce memory footprint of percpu_ref in fast path Ming Lei
2020-09-08  1:23 ` [PATCH V3 1/3] percpu_ref: add percpu_ref_inited() for MD Ming Lei
2020-09-09  0:48   ` Song Liu
2020-09-09  1:41   ` Bart Van Assche
2020-09-09  6:04     ` Christoph Hellwig
2020-09-08  1:23 ` [PATCH V3 2/3] percpu_ref: reduce memory footprint of percpu_ref in fast path Ming Lei
2020-09-08  1:23 ` [PATCH V3 3/3] block: move 'q_usage_counter' into front of 'request_queue' Ming Lei

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.