On Thu, Oct 01, 2020 at 11:48:41PM +0800, Ming Lei wrote: > '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. > > Tested-by: Veronika Kabatova <[email protected]> > Reviewed-by: Christoph Hellwig <[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: Ming Lei <[email protected]>
Acked-by: Tejun Heo <[email protected]> Thanks. -- tejun

