lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <efc65503-15fd-4f8d-a6c4-b3bacb7481cb@linux.alibaba.com>
Date: Tue, 27 Aug 2024 16:30:04 +0800
From: Jingbo Xu <jefflexu@...ux.alibaba.com>
To: Miklos Szeredi <miklos@...redi.hu>, yangyun <yangyun50@...wei.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
 lixiaokeng@...wei.com
Subject: Re: [PATCH] fuse: remove useless IOCB_DIRECT in
 fuse_direct_read/write_iter

Hi Miklos,

On 8/27/24 3:12 AM, Miklos Szeredi wrote:
> On Mon, 26 Aug 2024 at 15:07, yangyun <yangyun50@...wei.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.

-- 
Thanks,
Jingbo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ