From: Hao Xu <hao.xu@linux.dev>
To: Bernd Schubert <bernd.schubert@fastmail.fm>,
"fuse-devel@lists.sourceforge.net"
<fuse-devel@lists.sourceforge.net>,
miklos@szeredi.hu
Cc: Antonio SJ Musumeci <trapexit@spawn.link>, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] FUSE: add another flag to support shared mmap in FOPEN_DIRECT_IO mode
Date: Wed, 3 May 2023 13:09:15 +0800 [thread overview]
Message-ID: <75f7fa44-8bf8-f986-63f5-993b7fc863f7@linux.dev> (raw)
In-Reply-To: <45ad47ae-5471-3d44-d3d6-2760dee0945d@fastmail.fm>
Hi Bernd,
On 5/2/23 15:37, Bernd Schubert wrote:
> Hi Hao,
>
> On 5/2/23 09:28, Hao Xu wrote:
>> Hi all,
>>
>> From discussion with Bernd, I get that FOPEN_DIRECT_IO is designed
>> for those user cases where users want strong coherency like network
>> filesystems, where one server serves multiple remote clients. And
>> thus shared mmap is disabled since local page cache existence breaks
>> this kind of coherency.
>>
>> But here our use case is one virtiofs daemon serve one guest vm, We
>> use FOPEN_DIRECT_IO to reduce memory footprint not for coherency. So
>> we expect shared mmap works in this case. Here I suggest/am
>> implementing adding another flag to indicate this kind of
>> cases----use FOPEN_DIRECT_IO not for coherency----so that shared mmap
>> works.
>
> Yeah it should work, but I think what you want is "DAX" - can you try
> to enable it?
>
> fuse_i.h: FUSE_DAX_ALWAYS, /* "-o dax=always" */
> fuse_i.h: FUSE_DAX_NEVER, /* "-o dax=never" */
> fuse_i.h: FUSE_DAX_INODE_USER, /* "-o dax=inode" */
>
>
>
> Hope it helps,
> Bernd
Thanks for your suggestion, the thing is most IO in our case are small
random read to small files. I believe Dax should help but doubt it may
be not too much.
Another reason we are not leveraging DAX is the hypervisor software we
use doesn't support DAX well. So I think the feature in this RFC should
be good for
some non-DAX use cases (like ours)
Thanks,
Hao
prev parent reply other threads:[~2023-05-03 5:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-02 7:28 [RFC] FUSE: add another flag to support shared mmap in FOPEN_DIRECT_IO mode Hao Xu
2023-05-02 7:37 ` Bernd Schubert
2023-05-03 5:09 ` Hao Xu [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=75f7fa44-8bf8-f986-63f5-993b7fc863f7@linux.dev \
--to=hao.xu@linux.dev \
--cc=bernd.schubert@fastmail.fm \
--cc=fuse-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=trapexit@spawn.link \
/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).