From: Tejun Heo <tj@kernel.org>
To: Ming Lei <ming.lei@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
Veronika Kabatova <vkabatov@redhat.com>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Jens Axboe <axboe@kernel.dk>,
Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH V7 1/2] percpu_ref: reduce memory footprint of percpu_ref in fast path
Date: Thu, 1 Oct 2020 11:50:18 -0400 [thread overview]
Message-ID: <20201001155018.GI4441@mtj.duckdns.org> (raw)
In-Reply-To: <20201001154842.26896-2-ming.lei@redhat.com>
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@redhat.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 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: Ming Lei <ming.lei@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
next prev parent reply other threads:[~2020-10-01 15:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 15:48 [PATCH V7 0/2] percpu_ref & block: reduce memory footprint of percpu_ref in fast path Ming Lei
2020-10-01 15:48 ` [PATCH V7 1/2] percpu_ref: " Ming Lei
2020-10-01 15:50 ` Tejun Heo [this message]
2020-10-01 15:48 ` [PATCH V7 2/2] block: move 'q_usage_counter' into front of 'request_queue' Ming Lei
2020-10-06 7:41 ` [PATCH V7 0/2] percpu_ref & block: reduce memory footprint of percpu_ref in fast path Ming Lei
2020-10-06 13:30 ` 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=20201001155018.GI4441@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=sagi@grimberg.me \
--cc=vkabatov@redhat.com \
/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