From: Jens Axboe <axboe@kernel.dk>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] io_uring/rsrc: skip atomic refcount for uncloned buffers
Date: Wed, 02 Jul 2025 17:19:09 -0600 [thread overview]
Message-ID: <175149834929.467027.590610605534865564.b4-ty@kernel.dk> (raw)
In-Reply-To: <20250619143435.3474028-1-csander@purestorage.com>
On Thu, 19 Jun 2025 08:34:34 -0600, Caleb Sander Mateos wrote:
> io_buffer_unmap() performs an atomic decrement of the io_mapped_ubuf's
> reference count in case it has been cloned into another io_ring_ctx's
> registered buffer table. This is an expensive operation and unnecessary
> in the common case that the io_mapped_ubuf is only registered once.
> Load the reference count first and check whether it's 1. In that case,
> skip the atomic decrement and immediately free the io_mapped_ubuf.
>
> [...]
Applied, thanks!
[1/1] io_uring/rsrc: skip atomic refcount for uncloned buffers
commit: daa01d954b13a178c216b6a91f8451a7b83b3bf6
Best regards,
--
Jens Axboe
prev parent reply other threads:[~2025-07-02 23:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 14:34 [PATCH] io_uring/rsrc: skip atomic refcount for uncloned buffers Caleb Sander Mateos
2025-07-02 21:11 ` Caleb Sander Mateos
2025-07-02 23:10 ` Jens Axboe
2025-07-03 1:23 ` Caleb Sander Mateos
2025-07-02 23:19 ` Jens Axboe [this message]
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=175149834929.467027.590610605534865564.b4-ty@kernel.dk \
--to=axboe@kernel.dk \
--cc=csander@purestorage.com \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.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