From: yangyun <yangyun50@huawei.com>
To: <jefflexu@linux.alibaba.com>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<lixiaokeng@huawei.com>, <miklos@szeredi.hu>,
<yangyun50@huawei.com>
Subject: Re: [PATCH] fuse: remove useless IOCB_DIRECT in fuse_direct_read/write_iter
Date: Tue, 27 Aug 2024 19:52:52 +0800 [thread overview]
Message-ID: <20240827115252.3481395-1-yangyun50@huawei.com> (raw)
In-Reply-To: <efc65503-15fd-4f8d-a6c4-b3bacb7481cb@linux.alibaba.com>
On Tue, Aug 27, 2024 at 04:30:04PM +0800, Jingbo Xu wrote:
> Hi Miklos,
>
> On 8/27/24 3:12 AM, Miklos Szeredi wrote:
> > On Mon, 26 Aug 2024 at 15:07, yangyun <yangyun50@huawei.com> wrote:
> >>
> >> Commit 23c94e1cdcbf ("fuse: Switch to using async direct IO
> >> for FOPEN_DIRECT_IO") gave the async direct IO code path in the
> >> fuse_direct_read_iter() and fuse_direct_write_iter(). But since
> >> these two functions are only called under FOPEN_DIRECT_IO is set,
> >> it seems that we can also use the async direct IO even the flag
> >> IOCB_DIRECT is not set to enjoy the async direct IO method. Also
> >> move the definition of fuse_io_priv to where it is used in fuse_
> >> direct_write_iter.
> >
> > I'm interested in the motivation for this patch.
> >
> > There's a minor risk of regressions when introducing such a behavior
> > change, so there should also be a strong supporting argument, which
> > seems to be missing in this case.
> >
>
>
> I'm not sure what yangyun's use case is, but we indeed also observed a
> potential performance optimization for FOPEN_DIRECT_IO path. When the
> buffer IO is submitted to a file flagged with FOPEN_DIRECT_IO, the code
> path is like:
>
> fuse_direct_read_iter
> __fuse_direct_read
> fuse_direct_io
> # split the request to multiple fuse requests according to
> # max_read and max_pages constraint, for each split request:
> fuse_send_read
> fuse_simple_request
>
> When the size of the user requested IO is greater than max_read and
> max_pages constraint, it's split into multiple requests and these split
> requests can not be sent to the fuse server until the previous split
> request *completes* (since fuse_simple_request()), even when the user
> request is submitted from async IO e.g. io-uring.
The same use case. Your explanation is more explicit.
And I just don't know why commit 23c94e1cdcbf ("fuse: Switch to using async
direct IO for FOPEN_DIRECT_IO") adds the check of IOCB_DIRECT flag when using
async direct_io. It seems unnessary.
>
> --
> Thanks,
> Jingbo
next prev parent reply other threads:[~2024-08-27 11:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-26 13:06 yangyun
2024-08-26 19:12 ` Miklos Szeredi
2024-08-27 8:30 ` Jingbo Xu
2024-08-27 11:52 ` yangyun [this message]
2024-10-07 12:35 ` Miklos Szeredi
2024-08-27 11:41 ` yangyun
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=20240827115252.3481395-1-yangyun50@huawei.com \
--to=yangyun50@huawei.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lixiaokeng@huawei.com \
--cc=miklos@szeredi.hu \
/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
all inboxes | Powered by JetHome®