Linux io-uring development
 help / color / mirror / Atom feed
From: Sidong Yang <sidong.yang@furiosa.ai>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>, Jens Axboe <axboe@kernel.dk>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	io-uring@vger.kernel.org
Subject: Re: [RFC PATCH v2 0/2] introduce io_uring_cmd_import_fixed_vec
Date: Thu, 13 Mar 2025 19:44:10 +0900	[thread overview]
Message-ID: <Z9K2-mU3lrlRiV6s@sidongui-MacBookPro.local> (raw)
In-Reply-To: <7a4217ce-1251-452c-8570-fb36e811b234@gmail.com>

On Thu, Mar 13, 2025 at 08:57:45AM +0000, Pavel Begunkov wrote:
> On 3/12/25 14:23, Sidong Yang wrote:
> > This patche series introduce io_uring_cmd_import_vec. With this function,
> > Multiple fixed buffer could be used in uring cmd. It's vectored version
> > for io_uring_cmd_import_fixed(). Also this patch series includes a usage
> > for new api for encoded read in btrfs by using uring cmd.
> 
> Pretty much same thing, we're still left with 2 allocations in the
> hot path. What I think we can do here is to add caching on the
> io_uring side as we do with rw / net, but that would be invisible
> for cmd drivers. And that cache can be reused for normal iovec imports.
> 
> https://github.com/isilence/linux.git regvec-import-cmd
> (link for convenience)
> https://github.com/isilence/linux/tree/regvec-import-cmd
> 
> Not really target tested, no btrfs, not any other user, just an idea.
> There are 4 patches, but the top 3 are of interest.

Thanks, I justed checked the commits now. I think cache is good to resolve
this without allocation if cache hit. Let me reimpl this idea and test it
for btrfs.

> 
> Another way would be to cache in btrfs, but then btrfs would need to
> care about locking for the cache and some other bits, and we wouldn't
> be able to reuse it for other drivers.

Agreed, it could be better to reuse it for other driver.

Thanks,
Sidong
> 
> -- 
> Pavel Begunkov
> 

  reply	other threads:[~2025-03-13 10:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12 14:23 [RFC PATCH v2 0/2] introduce io_uring_cmd_import_fixed_vec Sidong Yang
2025-03-12 14:23 ` [RFC PATCH v2 1/2] io_uring: cmd: " Sidong Yang
2025-03-12 14:23 ` [RFC PATCH v2 2/2] btrfs: ioctl: use registered buffer for IORING_URING_CMD_FIXED Sidong Yang
2025-03-13  8:57 ` [RFC PATCH v2 0/2] introduce io_uring_cmd_import_fixed_vec Pavel Begunkov
2025-03-13 10:44   ` Sidong Yang [this message]
2025-03-13 13:15     ` Pavel Begunkov
2025-03-13 13:17       ` Pavel Begunkov
2025-03-13 13:56         ` Sidong Yang
2025-03-13 14:01           ` Jens Axboe
2025-03-13 14:21             ` Sidong Yang
  -- strict thread matches above, loose matches on Subject: below --
2025-03-12 13:09 Sidong Yang
2025-03-12 13:04 Sidong Yang

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=Z9K2-mU3lrlRiV6s@sidongui-MacBookPro.local \
    --to=sidong.yang@furiosa.ai \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=dsterba@suse.com \
    --cc=io-uring@vger.kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@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