From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
Sagi Grimberg <sagi@grimberg.me>, Tejun Heo <tj@kernel.org>,
Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH V2 1/2] percpu_ref: reduce memory footprint of percpu_ref in fast path
Date: Wed, 2 Sep 2020 15:44:35 +0200 [thread overview]
Message-ID: <20200902134435.GA32502@lst.de> (raw)
In-Reply-To: <20200902122643.634143-2-ming.lei@redhat.com>
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>
next prev parent reply other threads:[~2020-09-02 13:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 12:26 [PATCH V2 0/2] percpu_ref & block: reduce memory footprint of percpu_ref in fast path Ming Lei
2020-09-02 12:26 ` [PATCH V2 1/2] percpu_ref: " Ming Lei
2020-09-02 13:44 ` Christoph Hellwig [this message]
2020-09-02 12:26 ` [PATCH V2 2/2] block: move 'q_usage_counter' into front of 'request_queue' Ming Lei
2020-09-02 13:44 ` Christoph Hellwig
2020-09-02 14:02 ` [PATCH V2 0/2] percpu_ref & block: reduce memory footprint of percpu_ref in fast path Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200902134435.GA32502@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=sagi@grimberg.me \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox