[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201001155018.GI4441@mtj.duckdns.org>
Date: Thu, 1 Oct 2020 11:50:18 -0400
From: Tejun Heo <tj@...nel.org>
To: Ming Lei <ming.lei@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
Veronika Kabatova <vkabatov@...hat.com>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>, Jens Axboe <axboe@...nel.dk>,
Bart Van Assche <bvanassche@....org>
Subject: Re: [PATCH V7 1/2] percpu_ref: reduce memory footprint of percpu_ref
in fast path
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 <vkabatov@...hat.com>
> Reviewed-by: Christoph Hellwig <hch@....de>
> Cc: Sagi Grimberg <sagi@...mberg.me>
> Cc: Tejun Heo <tj@...nel.org>
> Cc: Christoph Hellwig <hch@....de>
> Cc: Jens Axboe <axboe@...nel.dk>
> Cc: Bart Van Assche <bvanassche@....org>
> Signed-off-by: Ming Lei <ming.lei@...hat.com>
Acked-by: Tejun Heo <tj@...nel.org>
Thanks.
--
tejun
Powered by blists - more mailing lists