Thread (6 messages) 6 messages, 3 authors, 2020-09-02

Re: [PATCH V2 1/2] percpu_ref: reduce memory footprint of percpu_ref in fast path

From: Christoph Hellwig <hch@lst.de>
Date: 2020-09-02 13:53:15
Also in: lkml

On Wed, Sep 02, 2020 at 08:26:42PM +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.
This looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help