linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Joanne Koong <joannelkoong@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, bernd.schubert@fastmail.fm,
	 jlayton@kernel.org, kernel-team@meta.com
Subject: Re: [PATCH v2] fuse: use splice for reading user pages on servers that enable it
Date: Fri, 16 May 2025 09:58:25 +0200	[thread overview]
Message-ID: <CAJfpegtFKC=SmYg7w3KDJgON5O3GFaLaUYuGu4VA2yv=aebeOg@mail.gmail.com> (raw)
In-Reply-To: <CAJnrk1bibc9Zj-Khtb4si1-8v3-X-1nX1Jgxc_whLt_SOxuS0Q@mail.gmail.com>

On Thu, 15 May 2025 at 21:16, Joanne Koong <joannelkoong@gmail.com> wrote:

> As I understand it, the zero copy uring api (I think the one you're
> talking about is the one discussed here [1]?) requires client-side
> changes in order to utilize it.
>
> [1] https://lore.kernel.org/linux-fsdevel/dc3a5c7d-b254-48ea-9749-2c464bfd3931@davidwei.uk/

No, that's not what I was thinking.  That sort of thing is out of
scope for fuse, I think.

Hmm, so you actually need "single copy" direct write.

 - there's the buffer that write(2) gets from application
 - it's copied into server's own buffer, at which point the write(2) can return
 - at some point this buffer is sent to the network and freed/reused

Currently this is not possible:

 - there's the buffer that write(2) gets from application
 - it's copied into libfuse's buffer, which is passed to the write callback
 - the server's write callback copies this to its own buffer, ...

What's preventing libfuse to allow the server to keep the buffer?  It
seems just a logistic problem, not some fundamental API issue.  Adding
a fuse_buf_clone() that just transfers ownership of the underlying
buffer is all that's needed on the API side.  As for the
implementation: libfuse would then need to handle the case of a buffer
that has been transferred.

Does this make sense?

Thanks,
Miklos

  reply	other threads:[~2025-05-16  7:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22 23:56 [PATCH v2] fuse: use splice for reading user pages on servers that enable it Joanne Koong
2025-05-02 13:16 ` Bernd Schubert
2025-05-07 14:45 ` Miklos Szeredi
2025-05-12 19:03   ` Joanne Koong
2025-05-13  5:46     ` Miklos Szeredi
2025-05-13 21:29       ` Joanne Koong
2025-05-14 11:56         ` Miklos Szeredi
2025-05-14 23:17           ` Joanne Koong
2025-05-15  8:38             ` Miklos Szeredi
2025-05-15 19:16               ` Joanne Koong
2025-05-16  7:58                 ` Miklos Szeredi [this message]
2025-05-16 18:15                   ` Bernd Schubert
2025-05-16 23:38                     ` Joanne Koong

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='CAJfpegtFKC=SmYg7w3KDJgON5O3GFaLaUYuGu4VA2yv=aebeOg@mail.gmail.com' \
    --to=miklos@szeredi.hu \
    --cc=bernd.schubert@fastmail.fm \
    --cc=jlayton@kernel.org \
    --cc=joannelkoong@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).