aboutsummaryrefslogtreecommitdiff
path: root/sound/core/pcm_misc.c
diff options
context:
space:
mode:
authorGravatar Ming Lei <ming.lei@redhat.com> 2020-10-01 23:48:41 +0800
committerGravatar Jens Axboe <axboe@kernel.dk> 2020-10-06 07:29:36 -0600
commit2b0d3d3e4fcfb19d10f9a82910b8f0f05c56ee3e (patch)
tree1ffab7ee6f2455b56c8128379ab032e06df8cf8e /sound/core/pcm_misc.c
parentblock: warn if !__GFP_DIRECT_RECLAIM in bio_crypt_set_ctx() (diff)
downloadlinux-2b0d3d3e4fcfb19d10f9a82910b8f0f05c56ee3e.tar.gz
linux-2b0d3d3e4fcfb19d10f9a82910b8f0f05c56ee3e.tar.bz2
linux-2b0d3d3e4fcfb19d10f9a82910b8f0f05c56ee3e.zip
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 <ming.lei@redhat.com> Tested-by: Veronika Kabatova <vkabatov@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Tejun Heo <tj@kernel.org> 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> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'sound/core/pcm_misc.c')
0 files changed, 0 insertions, 0 deletions