From f4a8105a4245b5b4ac669382235db715945db363 Mon Sep 17 00:00:00 2001 From: David Fairbrother Date: Sat, 26 Aug 2023 12:16:41 +0100 Subject: [PATCH 1/3] Clarify parallel direct writes conditions Clarify that paralell direct can only be enabled where the kernel version supports it, which is 6.2+. State the two cache.files modes which can support parallel direct writes in the description. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 43dc1bfb..f08c558f 100644 --- a/README.md +++ b/README.md @@ -289,7 +289,8 @@ These options are the same regardless of whether you use them with the (default: false) * **parallel-direct-writes=BOOL**: Allow the kernel to dispatch multiple, parallel (non-extending) write requests for files opened - with `direct_io=true` (if supported by the kernel) + with `cache.files=per-process` (if the process is not in `process-names`) + or `cache.files=off`. (This requires kernel support, and was added in v6.2) * **direct_io**: deprecated - Bypass page cache. Use `cache.files=off` instead. (default: false) * **kernel_cache**: deprecated - Do not invalidate data cache on file From 3d05999db081df1184f7e29ed82354816dd3679a Mon Sep 17 00:00:00 2001 From: David Fairbrother Date: Sat, 26 Aug 2023 12:23:09 +0100 Subject: [PATCH 2/3] State cache.files per-process behaviour w/out match This makes it clear, along with the previous commit, that per-process will allow us to use parallel direct writes as they will mount with the equivalent of cache.files=off (i.e. direct_io) --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f08c558f..32bfa64d 100644 --- a/README.md +++ b/README.md @@ -1294,12 +1294,12 @@ https://en.wikipedia.org/wiki/Page_cache unchanged since previous open. * cache.files=libfuse: follow traditional libfuse `direct_io`, `kernel_cache`, and `auto_cache` arguments. -* cache.files=per-process: Enable page caching only for processes - which 'comm' name matches one of the values defined in - `cache.files.process-names`. +* cache.files=per-process: Enable page caching (equivalent to `cache.files=partial`) + only for processes which 'comm' name matches one of the values defined in + `cache.files.process-names`. If the name does not match the file open + is equivalent to `cache.files=off`. -FUSE, which mergerfs uses, offers a number of page caching -modes. mergerfs tries to simplify their use via the `cache.files` +FUSE, which mergerfs uses, offers a number of page caching modes. mergerfs tries to simplify their use via the `cache.files` option. It can and should replace usage of `direct_io`, `kernel_cache`, and `auto_cache`. From b545352712577eb7e5d91c4bc33749875790aa99 Mon Sep 17 00:00:00 2001 From: David Fairbrother Date: Sat, 26 Aug 2023 12:31:44 +0100 Subject: [PATCH 3/3] Nit: cache.files=per-process grammar Change which 'comm' name -> whose 'comm' name. Whose implies possession, and the process possess the name we're matching --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32bfa64d..fbab4602 100644 --- a/README.md +++ b/README.md @@ -1295,7 +1295,7 @@ https://en.wikipedia.org/wiki/Page_cache * cache.files=libfuse: follow traditional libfuse `direct_io`, `kernel_cache`, and `auto_cache` arguments. * cache.files=per-process: Enable page caching (equivalent to `cache.files=partial`) - only for processes which 'comm' name matches one of the values defined in + only for processes whose 'comm' name matches one of the values defined in `cache.files.process-names`. If the name does not match the file open is equivalent to `cache.files=off`.