All of lore.kernel.org
 help / color / mirror / Atom feed
From: JeffleXu <jefflexu@linux.alibaba.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: stefanha@redhat.com, miklos@szeredi.hub,
	linux-fsdevel@vger.kernel.org, virtio-fs@redhat.com,
	bo.liu@linux.alibaba.com, joseph.qi@linux.alibaba.com
Subject: Re: [PATCH v6 2/7] fuse: make DAX mount option a tri-state
Date: Fri, 29 Oct 2021 16:33:06 +0800	[thread overview]
Message-ID: <eb0c9711-66cb-bf79-0cf6-c6d6eec5ceea@linux.alibaba.com> (raw)
In-Reply-To: <YXAsV3xp3aeOjaeh@redhat.com>



On 10/20/21 10:48 PM, Vivek Goyal wrote:
> On Wed, Oct 20, 2021 at 10:52:38AM +0800, JeffleXu wrote:
>>
>>
>> On 10/18/21 10:10 PM, Vivek Goyal wrote:
>>> On Mon, Oct 11, 2021 at 11:00:47AM +0800, Jeffle Xu wrote:
>>>> We add 'always', 'never', and 'inode' (default). '-o dax' continues to
>>>> operate the same which is equivalent to 'always'. To be consistemt with
>>>> ext4/xfs's tri-state mount option, when neither '-o dax' nor '-o dax='
>>>> option is specified, the default behaviour is equal to 'inode'.
>>>
>>> Hi Jeffle,
>>>
>>> I am not sure when  -o "dax=inode"  is used as a default? If user
>>> specifies, "-o dax" then it is equal to "-o dax=always", otherwise
>>> user will explicitly specify "-o dax=always/never/inode". So when
>>> is dax=inode is used as default?
>>
>> That means when neither '-o dax' nor '-o dax=always/never/inode' is
>> specified, it is actually equal to '-o dax=inode', which is also how
>> per-file DAX on ext4/xfs works.
>>
>> This default behaviour for local filesystem, e.g. ext4/xfs, may be
>> straightforward, since the disk inode will be read into memory during
>> the inode instantiation, and checking for persistent inode attribute
>> shall be realatively cheap, except that the default behaviour has
>> changed from 'dax=never' to 'dax=inode'.
> 
> Interesting that ext4/xfs allowed for this behavior change.
> 
>>
>> Come back to virtiofs, when neither '-o dax' nor '-o
>> dax=always/never/inode' is specified, and it actually behaves as '-o
>> dax=inode', as long as '-o dax=server/attr' option is not specified for
>> virtiofsd, virtiofsd will always clear FUSE_ATTR_DAX and thus guest will
>> always disable DAX. IOWs, the guest virtiofs atually behaves as '-o
>> dax=never' when neither '-o dax' nor '-o dax=always/never/inode' is
>> specified, and '-o dax=server/attr' option is not specified for virtiofsd.
>>
>> But I'm okay if we need to change the default behaviour for virtiofs.
> 
> This is change of behavior from client's perspective. Even if client
> did not opt-in for DAX, DAX can be enabled based on server's setting.
> Not that there is anything wrong with it, but change of behavior part
> concerns me.
> 
> In case of virtiofs, lot of features we are controlling from server.
> Client typically just calls "mount" and there are not many options
> users can specify for mount.  
> 
> Given we already allowed to make client a choice about DAX behavior,
> I will feel more comfortable that we don't change it and let client
> request a specific DAX mode and if client does not specify anything,
> then DAX is not enabled.
> 

Hi Vivek,

How about the following design about the default behavior to move this
patchset forward, considering the discussion on another thread [1]?

- guest side: '-o dax=inode' acts as the default, keeping consistent
with xfs/ext4
- virtiofsd: the default behavior is like, neither file size based
policy ('dax=server') nor persistent inode flags based policy
('dax=attr') is used, though virtiofsd indeed advertises that
it supports per inode DAX feature (so that it won't fail FUSE_INIT
negotiation phase when guest advertises dax=inode by default)... In
fact, it acts like 'dax=never' in this case.

Then when guest opts-in and specifies '-o dax=inode' manually, then it
shall realize that proper configuration for virtiofsd is also needed (-o
dax=server|attr).

[1] https://www.spinics.net/lists/linux-xfs/msg56642.html

-- 
Thanks,
Jeffle

WARNING: multiple messages have this Message-ID (diff)
From: JeffleXu <jefflexu@linux.alibaba.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: virtio-fs@redhat.com, joseph.qi@linux.alibaba.com,
	miklos@szeredi.hub, linux-fsdevel@vger.kernel.org
Subject: Re: [Virtio-fs] [PATCH v6 2/7] fuse: make DAX mount option a tri-state
Date: Fri, 29 Oct 2021 16:33:06 +0800	[thread overview]
Message-ID: <eb0c9711-66cb-bf79-0cf6-c6d6eec5ceea@linux.alibaba.com> (raw)
In-Reply-To: <YXAsV3xp3aeOjaeh@redhat.com>



On 10/20/21 10:48 PM, Vivek Goyal wrote:
> On Wed, Oct 20, 2021 at 10:52:38AM +0800, JeffleXu wrote:
>>
>>
>> On 10/18/21 10:10 PM, Vivek Goyal wrote:
>>> On Mon, Oct 11, 2021 at 11:00:47AM +0800, Jeffle Xu wrote:
>>>> We add 'always', 'never', and 'inode' (default). '-o dax' continues to
>>>> operate the same which is equivalent to 'always'. To be consistemt with
>>>> ext4/xfs's tri-state mount option, when neither '-o dax' nor '-o dax='
>>>> option is specified, the default behaviour is equal to 'inode'.
>>>
>>> Hi Jeffle,
>>>
>>> I am not sure when  -o "dax=inode"  is used as a default? If user
>>> specifies, "-o dax" then it is equal to "-o dax=always", otherwise
>>> user will explicitly specify "-o dax=always/never/inode". So when
>>> is dax=inode is used as default?
>>
>> That means when neither '-o dax' nor '-o dax=always/never/inode' is
>> specified, it is actually equal to '-o dax=inode', which is also how
>> per-file DAX on ext4/xfs works.
>>
>> This default behaviour for local filesystem, e.g. ext4/xfs, may be
>> straightforward, since the disk inode will be read into memory during
>> the inode instantiation, and checking for persistent inode attribute
>> shall be realatively cheap, except that the default behaviour has
>> changed from 'dax=never' to 'dax=inode'.
> 
> Interesting that ext4/xfs allowed for this behavior change.
> 
>>
>> Come back to virtiofs, when neither '-o dax' nor '-o
>> dax=always/never/inode' is specified, and it actually behaves as '-o
>> dax=inode', as long as '-o dax=server/attr' option is not specified for
>> virtiofsd, virtiofsd will always clear FUSE_ATTR_DAX and thus guest will
>> always disable DAX. IOWs, the guest virtiofs atually behaves as '-o
>> dax=never' when neither '-o dax' nor '-o dax=always/never/inode' is
>> specified, and '-o dax=server/attr' option is not specified for virtiofsd.
>>
>> But I'm okay if we need to change the default behaviour for virtiofs.
> 
> This is change of behavior from client's perspective. Even if client
> did not opt-in for DAX, DAX can be enabled based on server's setting.
> Not that there is anything wrong with it, but change of behavior part
> concerns me.
> 
> In case of virtiofs, lot of features we are controlling from server.
> Client typically just calls "mount" and there are not many options
> users can specify for mount.  
> 
> Given we already allowed to make client a choice about DAX behavior,
> I will feel more comfortable that we don't change it and let client
> request a specific DAX mode and if client does not specify anything,
> then DAX is not enabled.
> 

Hi Vivek,

How about the following design about the default behavior to move this
patchset forward, considering the discussion on another thread [1]?

- guest side: '-o dax=inode' acts as the default, keeping consistent
with xfs/ext4
- virtiofsd: the default behavior is like, neither file size based
policy ('dax=server') nor persistent inode flags based policy
('dax=attr') is used, though virtiofsd indeed advertises that
it supports per inode DAX feature (so that it won't fail FUSE_INIT
negotiation phase when guest advertises dax=inode by default)... In
fact, it acts like 'dax=never' in this case.

Then when guest opts-in and specifies '-o dax=inode' manually, then it
shall realize that proper configuration for virtiofsd is also needed (-o
dax=server|attr).

[1] https://www.spinics.net/lists/linux-xfs/msg56642.html

-- 
Thanks,
Jeffle


  reply	other threads:[~2021-10-29  8:33 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11  3:00 [PATCH v6 0/7] fuse,virtiofs: support per-file DAX Jeffle Xu
2021-10-11  3:00 ` [Virtio-fs] " Jeffle Xu
2021-10-11  3:00 ` [PATCH v6 1/7] fuse: add fuse_should_enable_dax() helper Jeffle Xu
2021-10-11  3:00   ` [Virtio-fs] " Jeffle Xu
2021-10-11  3:00 ` [PATCH v6 2/7] fuse: make DAX mount option a tri-state Jeffle Xu
2021-10-11  3:00   ` [Virtio-fs] " Jeffle Xu
2021-10-18 14:10   ` Vivek Goyal
2021-10-18 14:10     ` [Virtio-fs] " Vivek Goyal
2021-10-20  2:52     ` JeffleXu
2021-10-20  2:52       ` [Virtio-fs] " JeffleXu
2021-10-20 14:48       ` Vivek Goyal
2021-10-20 14:48         ` [Virtio-fs] " Vivek Goyal
2021-10-29  8:33         ` JeffleXu [this message]
2021-10-29  8:33           ` JeffleXu
2021-10-29 13:03           ` Vivek Goyal
2021-10-29 13:03             ` [Virtio-fs] " Vivek Goyal
2021-11-01  8:21             ` JeffleXu
2021-11-01  8:21               ` [Virtio-fs] " JeffleXu
2021-10-20 15:17       ` Vivek Goyal
2021-10-20 15:17         ` [Virtio-fs] " Vivek Goyal
2021-10-22  6:54         ` JeffleXu
2021-10-22  6:54           ` [Virtio-fs] " JeffleXu
2021-10-25 17:52           ` Ira Weiny
2021-10-25 17:52             ` [Virtio-fs] " Ira Weiny
2021-10-25 18:12             ` Vivek Goyal
2021-10-25 18:12               ` [Virtio-fs] " Vivek Goyal
2021-10-25 19:02               ` Ira Weiny
2021-10-25 19:02                 ` [Virtio-fs] " Ira Weiny
2021-10-25 19:33                 ` Vivek Goyal
2021-10-25 19:33                   ` [Virtio-fs] " Vivek Goyal
2021-10-25 20:41                   ` Ira Weiny
2021-10-25 20:41                     ` [Virtio-fs] " Ira Weiny
2021-10-26 13:45                     ` Vivek Goyal
2021-10-26 13:45                       ` [Virtio-fs] " Vivek Goyal
2021-10-27  6:00                 ` JeffleXu
2021-10-27  6:00                   ` [Virtio-fs] " JeffleXu
2021-10-11  3:00 ` [PATCH v6 3/7] fuse: support per-file DAX in fuse protocol Jeffle Xu
2021-10-11  3:00   ` [Virtio-fs] " Jeffle Xu
2021-10-18 14:14   ` Vivek Goyal
2021-10-18 14:14     ` [Virtio-fs] " Vivek Goyal
2021-10-18 14:20     ` Vivek Goyal
2021-10-18 14:20       ` [Virtio-fs] " Vivek Goyal
2021-10-20  3:04       ` JeffleXu
2021-10-20  3:04         ` [Virtio-fs] " JeffleXu
2021-10-20 14:54         ` Vivek Goyal
2021-10-20 14:54           ` [Virtio-fs] " Vivek Goyal
2021-10-11  3:00 ` [PATCH v6 4/7] fuse: negotiate per-file DAX in FUSE_INIT Jeffle Xu
2021-10-11  3:00   ` [Virtio-fs] " Jeffle Xu
2021-10-18 14:30   ` Vivek Goyal
2021-10-18 14:30     ` [Virtio-fs] " Vivek Goyal
2021-10-20  3:10     ` JeffleXu
2021-10-20  3:10       ` [Virtio-fs] " JeffleXu
2021-10-20 15:44       ` Vivek Goyal
2021-10-20 15:44         ` [Virtio-fs] " Vivek Goyal
2021-10-11  3:00 ` [PATCH v6 5/7] fuse: enable per-file DAX Jeffle Xu
2021-10-11  3:00   ` [Virtio-fs] " Jeffle Xu
2021-10-18 15:11   ` Vivek Goyal
2021-10-18 15:11     ` [Virtio-fs] " Vivek Goyal
2021-10-11  3:00 ` [PATCH v6 6/7] fuse: mark inode DONT_CACHE when per-file DAX hint changes Jeffle Xu
2021-10-11  3:00   ` [Virtio-fs] " Jeffle Xu
2021-10-18 15:19   ` Vivek Goyal
2021-10-18 15:19     ` [Virtio-fs] " Vivek Goyal
2021-10-27  5:05     ` JeffleXu
2021-10-27  5:05       ` [Virtio-fs] " JeffleXu
2021-10-11  3:00 ` [PATCH v6 7/7] Documentation/filesystem/dax: record DAX on virtiofs Jeffle Xu
2021-10-11  3:00   ` [Virtio-fs] " Jeffle Xu
2021-10-15  3:33 ` [PATCH v6 0/7] fuse,virtiofs: support per-file DAX JeffleXu
2021-10-15  3:33   ` [Virtio-fs] " JeffleXu
2021-10-18 15:21 ` Vivek Goyal
2021-10-18 15:21   ` [Virtio-fs] " Vivek Goyal
2021-10-20  5:22   ` JeffleXu
2021-10-20  5:22     ` [Virtio-fs] " JeffleXu
2021-10-20 16:06     ` Vivek Goyal
2021-10-20 16:06       ` [Virtio-fs] " Vivek Goyal

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=eb0c9711-66cb-bf79-0cf6-c6d6eec5ceea@linux.alibaba.com \
    --to=jefflexu@linux.alibaba.com \
    --cc=bo.liu@linux.alibaba.com \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hub \
    --cc=stefanha@redhat.com \
    --cc=vgoyal@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.