linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation/dax: Update description of DAX policy changing
@ 2021-01-04  2:40 Hao Li
  2021-01-04 16:36 ` Ira Weiny
  0 siblings, 1 reply; 3+ messages in thread
From: Hao Li @ 2021-01-04  2:40 UTC (permalink / raw)
  To: corbet
  Cc: davem, gregkh, alexander.deucher, mchehab+huawei, lee.jones,
	ira.weiny, linux-doc, linux-kernel, lihao2018.fnst

After commit 77573fa310d9 ("fs: Kill DCACHE_DONTCACHE dentry even if
DCACHE_REFERENCED is set"), changes to DAX policy will take effect
as soon as all references to this file are gone.

Update the documentation accordingly.

Signed-off-by: Hao Li <lihao2018.fnst@cn.fujitsu.com>
---
 Documentation/filesystems/dax.txt | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/Documentation/filesystems/dax.txt b/Documentation/filesystems/dax.txt
index 8fdb78f3c6c9..a5af22831087 100644
--- a/Documentation/filesystems/dax.txt
+++ b/Documentation/filesystems/dax.txt
@@ -84,19 +84,8 @@ Summary
        described in 6) below.
 
  6. When changing the S_DAX policy via toggling the persistent FS_XFLAG_DAX flag,
-    the change in behaviour for existing regular files may not occur
-    immediately.  If the change must take effect immediately, the administrator
-    needs to:
-
-    a) stop the application so there are no active references to the data set
-       the policy change will affect
-
-    b) evict the data set from kernel caches so it will be re-instantiated when
-       the application is restarted. This can be achieved by:
-
-       i. drop-caches
-       ii. a filesystem unmount and mount cycle
-       iii. a system reboot
+    the change to existing regular file won't take effect until the file is closed
+    by all processes or all processes referencing the file are stopped.
 
 
 Details
-- 
2.29.2




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation/dax: Update description of DAX policy changing
  2021-01-04  2:40 [PATCH] Documentation/dax: Update description of DAX policy changing Hao Li
@ 2021-01-04 16:36 ` Ira Weiny
  2021-01-06  1:15   ` Li, Hao
  0 siblings, 1 reply; 3+ messages in thread
From: Ira Weiny @ 2021-01-04 16:36 UTC (permalink / raw)
  To: Hao Li
  Cc: corbet, davem, gregkh, alexander.deucher, mchehab+huawei,
	lee.jones, linux-doc, linux-kernel

On Mon, Jan 04, 2021 at 10:40:40AM +0800, Hao Li wrote:
> After commit 77573fa310d9 ("fs: Kill DCACHE_DONTCACHE dentry even if
> DCACHE_REFERENCED is set"), changes to DAX policy will take effect
> as soon as all references to this file are gone.
> 
> Update the documentation accordingly.
> 
> Signed-off-by: Hao Li <lihao2018.fnst@cn.fujitsu.com>
> ---
>  Documentation/filesystems/dax.txt | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/Documentation/filesystems/dax.txt b/Documentation/filesystems/dax.txt
> index 8fdb78f3c6c9..a5af22831087 100644
> --- a/Documentation/filesystems/dax.txt
> +++ b/Documentation/filesystems/dax.txt
> @@ -84,19 +84,8 @@ Summary
>         described in 6) below.
>  
>   6. When changing the S_DAX policy via toggling the persistent FS_XFLAG_DAX flag,
                                                                                  ^^
                                                  I would delete this '.' as well.

> -    the change in behaviour for existing regular files may not occur
> -    immediately.  If the change must take effect immediately, the administrator
> -    needs to:
> -
> -    a) stop the application so there are no active references to the data set
> -       the policy change will affect
> -
> -    b) evict the data set from kernel caches so it will be re-instantiated when
> -       the application is restarted. This can be achieved by:
> -
> -       i. drop-caches
> -       ii. a filesystem unmount and mount cycle
> -       iii. a system reboot
> +    the change to existing regular file won't take effect until the file is closed
                                                                      ^^^^^
                                                                      files

> +    by all processes or all processes referencing the file are stopped.

So how about:

   6. When changing the S_DAX policy via toggling the persistent FS_XFLAG_DAX
      flag the change to existing regular files won't take effect until the file
      is closed by all processes or all processes referencing the file are
      stopped.

I also feel like mentioning the stoppage of process' is redundant as users
should know that will result in the closing of those FDs but I'm ok leaving it
if others like it.

Ira

>  
>  
>  Details
> -- 
> 2.29.2
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation/dax: Update description of DAX policy changing
  2021-01-04 16:36 ` Ira Weiny
@ 2021-01-06  1:15   ` Li, Hao
  0 siblings, 0 replies; 3+ messages in thread
From: Li, Hao @ 2021-01-06  1:15 UTC (permalink / raw)
  To: Ira Weiny
  Cc: corbet, davem, gregkh, alexander.deucher, mchehab+huawei,
	lee.jones, linux-doc, linux-kernel

On 2021/1/5 0:36, Ira Weiny wrote:
> On Mon, Jan 04, 2021 at 10:40:40AM +0800, Hao Li wrote:
>> After commit 77573fa310d9 ("fs: Kill DCACHE_DONTCACHE dentry even if
>> DCACHE_REFERENCED is set"), changes to DAX policy will take effect
>> as soon as all references to this file are gone.
>>
>> Update the documentation accordingly.
>>
>> Signed-off-by: Hao Li <lihao2018.fnst@cn.fujitsu.com>
>> ---
>>  Documentation/filesystems/dax.txt | 15 ++-------------
>>  1 file changed, 2 insertions(+), 13 deletions(-)
>>
>> diff --git a/Documentation/filesystems/dax.txt b/Documentation/filesystems/dax.txt
>> index 8fdb78f3c6c9..a5af22831087 100644
>> --- a/Documentation/filesystems/dax.txt
>> +++ b/Documentation/filesystems/dax.txt
>> @@ -84,19 +84,8 @@ Summary
>>         described in 6) below.
>>  
>>   6. When changing the S_DAX policy via toggling the persistent FS_XFLAG_DAX flag,
>                                                                                   ^^
>                                                   I would delete this '.' as well.
>
>> -    the change in behaviour for existing regular files may not occur
>> -    immediately.  If the change must take effect immediately, the administrator
>> -    needs to:
>> -
>> -    a) stop the application so there are no active references to the data set
>> -       the policy change will affect
>> -
>> -    b) evict the data set from kernel caches so it will be re-instantiated when
>> -       the application is restarted. This can be achieved by:
>> -
>> -       i. drop-caches
>> -       ii. a filesystem unmount and mount cycle
>> -       iii. a system reboot
>> +    the change to existing regular file won't take effect until the file is closed
>                                                                       ^^^^^
>                                                                       files
>
>> +    by all processes or all processes referencing the file are stopped.
>
> So how about:
>
>    6. When changing the S_DAX policy via toggling the persistent FS_XFLAG_DAX
>       flag the change to existing regular files won't take effect until the file
>       is closed by all processes or all processes referencing the file are
>       stopped.
>
> I also feel like mentioning the stoppage of process' is redundant as users
> should know that will result in the closing of those FDs but I'm ok leaving it
> if others like it.

Thanks, it's much better than before.

Regards,
Hao Li

>
>
> Ira
>
>>  
>>  
>>  Details
>> --
>> 2.29.2
>>
>>
>>
>
>




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-06  1:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04  2:40 [PATCH] Documentation/dax: Update description of DAX policy changing Hao Li
2021-01-04 16:36 ` Ira Weiny
2021-01-06  1:15   ` Li, Hao

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).