]> Git Repo - linux.git/commit
percpu_ref: reduce memory footprint of percpu_ref in fast path
authorMing Lei <[email protected]>
Thu, 1 Oct 2020 15:48:41 +0000 (23:48 +0800)
committerJens Axboe <[email protected]>
Tue, 6 Oct 2020 13:29:36 +0000 (07:29 -0600)
commit2b0d3d3e4fcfb19d10f9a82910b8f0f05c56ee3e
tree1ffab7ee6f2455b56c8128379ab032e06df8cf8e
parentcf785af19319f9fc0fc0c0604d259f1ef31b502f
percpu_ref: reduce memory footprint of percpu_ref in fast path

'struct percpu_ref' is often embedded into one user structure, and the
instance is usually referenced in fast path, however actually only
'percpu_count_ptr' is needed in fast path.

So move other fields into one new structure of 'percpu_ref_data', and
allocate it dynamically via kzalloc(), then memory footprint of
'percpu_ref' in fast path is reduced a lot and becomes suitable to put
into hot cacheline of user structure.

Signed-off-by: Ming Lei <[email protected]>
Tested-by: Veronika Kabatova <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Cc: Sagi Grimberg <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Bart Van Assche <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
drivers/infiniband/sw/rdmavt/mr.c
include/linux/percpu-refcount.h
lib/percpu-refcount.c
This page took 0.057083 seconds and 4 git commands to generate.