From: Vivek Goyal <vgoyal@redhat.com>
To: Liu Bo <bo.liu@linux.alibaba.com>
Cc: virtio-fs@redhat.com, Miklos Szeredi <mszeredi@redhat.com>
Subject: Re: [Virtio-fs] [PATCH 6/9] virtio-fs: let dax style override directIO style when dax+cache=none
Date: Thu, 25 Apr 2019 14:35:57 -0400 [thread overview]
Message-ID: <20190425183557.GC17670@redhat.com> (raw)
In-Reply-To: <20190417193553.t367ekb37vnpnkd4@US-160370MP2.local>
On Wed, Apr 17, 2019 at 12:35:54PM -0700, Liu Bo wrote:
> On Wed, Apr 17, 2019 at 10:25:53AM +0200, Miklos Szeredi wrote:
> > On Tue, Apr 16, 2019 at 9:38 PM Vivek Goyal <vgoyal@redhat.com> wrote:
> > >
> > > On Wed, Apr 17, 2019 at 02:03:19AM +0800, Liu Bo wrote:
> > > > In case of dax+cache=none, mmap uses dax style prior to directIO style,
> > > > while read/write don't, but it seems that there is no reason not to do so.
> > > >
> > > > Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
> > > > Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> > >
> > > This is interesting. I was thinking about it today itself. I noticed
> > > that ext4 and xfs also check for DAX inode first and use dax path
> > > if dax is enabled.
> > >
> > > cache=never sets FOPEN_DIRECT_IO (even if application never asked for
> > > direct IO). If dax is enabled, for data its equivalent to doing direct
> > > IO. And for mmap() we are already checking for DAX first. So it makes
> > > sense to do same thing for read/write path as well.
> > >
> > > CCing Miklos as well. He might have some thougts on this. I am curios
> > > that initially whey did he make this change only for mmap() and not
> > > for read/write paths.
> >
> > AFAIR the main reason was that we had performance issues with size
> > extending writes with dax.
> >
> > There is also the question of mtime updates and atime updates, which
> > are handled properly with FOPEN_DIRECT_IO, but not with DAX I/O.
>
> Looks like fuse_iget() has set inode with NOATIME and NOCMTIME under
> the case "!fc->writeback_cache", which is true in dax mode, do we
> still case about time update?
>
> AFAICS, these metadata are maintained by host side.
I guess what Miklos is alluding to is that with cache=none,
FOPEN_DIRECT_IO will always be set. That means file data will not be
cached in guest and all read/writes and file changes will go through
fuse daemon and that will result in atime/ctime/mtime update on file
on host (because of fuse daemon operations).
But with DAX path, it translates to mmap() IO on host and atime/mtime/ctime
update semantics are every different there as opposed to read/write.
My take on this is that we have two modes here. "cache=none" and
"cache=none+dax". Those who are concerned with strict atime/ctime/mtime
update behavior, should not mount with dax enabled.
Thanks
Vivek
next prev parent reply other threads:[~2019-04-25 18:35 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 18:03 [Virtio-fs] [PATCH 0/9] virtio-fs fixes Liu Bo
2019-04-16 18:03 ` [Virtio-fs] [PATCH 1/9] virtio-fs: fix multiple tag support Liu Bo
2019-04-16 18:09 ` Vivek Goyal
2019-04-16 18:03 ` [Virtio-fs] [PATCH 2/9] virtio-fs: clean up dax mapping before aborting connection Liu Bo
2019-04-16 18:18 ` Vivek Goyal
2019-04-16 18:40 ` Liu Bo
2019-04-16 18:03 ` [Virtio-fs] [PATCH 3/9] fuse: export fuse_drop_waiting() Liu Bo
2019-04-16 18:28 ` Vivek Goyal
2019-04-16 18:43 ` Liu Bo
2019-04-16 18:03 ` [Virtio-fs] [PATCH 4/9] virtio-fs: fix use-after-free against virtio_fs_vq's fuse_dev info Liu Bo
2019-04-23 19:51 ` Vivek Goyal
2019-04-25 0:16 ` Liu Bo
2019-04-16 18:03 ` [Virtio-fs] [PATCH 5/9] fuse: do not write whole page while page straddles i_size Liu Bo
2019-04-16 20:16 ` Vivek Goyal
2019-04-17 0:12 ` Liu Bo
2019-04-16 18:03 ` [Virtio-fs] [PATCH 6/9] virtio-fs: let dax style override directIO style when dax+cache=none Liu Bo
2019-04-16 19:38 ` Vivek Goyal
2019-04-17 8:25 ` Miklos Szeredi
2019-04-17 19:35 ` Liu Bo
2019-04-25 18:35 ` Vivek Goyal [this message]
2019-04-17 20:56 ` Vivek Goyal
2019-04-22 18:55 ` Liu Bo
2019-04-22 18:14 ` Vivek Goyal
2019-04-16 18:03 ` [Virtio-fs] [PATCH 7/9] fuse: return early if punch_hole fails Liu Bo
2019-04-16 19:51 ` Vivek Goyal
2019-04-16 18:03 ` [Virtio-fs] [PATCH 8/9] virtio-fs: honor RLIMIT_FSIZE in fuse_file_fallocate Liu Bo
2019-04-16 19:57 ` Vivek Goyal
2019-04-16 18:03 ` [Virtio-fs] [PATCH 9/9] fuse: fix deadlock in __fuse_file_fallocate() Liu Bo
2019-04-16 18:07 ` Vivek Goyal
2019-05-02 22:10 ` Liu Bo
2019-05-03 15:22 ` Vivek Goyal
2019-04-24 18:41 ` [Virtio-fs] [PATCH 0/9] virtio-fs fixes Vivek Goyal
2019-04-24 23:12 ` Liu Bo
2019-04-25 14:59 ` Vivek Goyal
2019-04-25 18:10 ` Liu Bo
2019-04-27 0:58 ` Liu Bo
2019-04-29 13:18 ` Vivek Goyal
2019-04-30 1:38 ` Liu Bo
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=20190425183557.GC17670@redhat.com \
--to=vgoyal@redhat.com \
--cc=bo.liu@linux.alibaba.com \
--cc=mszeredi@redhat.com \
--cc=virtio-fs@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.