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

2020-10-01 Thread Ming Lei
On Wed, Sep 30, 2020 at 12:00:15PM -0400, Tejun Heo wrote: > On Wed, Sep 30, 2020 at 04:26:56PM +0800, Ming Lei wrote: > > diff --git a/include/linux/percpu-refcount.h > > b/include/linux/percpu-refcount.h > > index 87d8a38bdea1..1d6ed9ca23dd 100644 > > --- a/include/linux/percpu-refcount.h > >

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

2020-09-30 Thread Tejun Heo
On Wed, Sep 30, 2020 at 04:26:56PM +0800, Ming Lei wrote: > diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h > index 87d8a38bdea1..1d6ed9ca23dd 100644 > --- a/include/linux/percpu-refcount.h > +++ b/include/linux/percpu-refcount.h > @@ -92,18 +92,23 @@ enum { >

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

2020-09-30 Thread Ming Lei
'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