Skip to content

Commit 24d5293

Browse files
committed
add more alternatives
Signed-off-by: machine424 <[email protected]>
1 parent 5c89855 commit 24d5293

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

Diff for: proposals/2025-01-02_direct-io.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ achieved through direct I/O are welcome.
3535

3636
In addition to the issues mentioned above, sometimes the page cache generated during writes is not
3737
used at all. For instance, once chunks are written during compaction, they are opened via
38-
`mmap`, which renders the page cache produced during writing redundant and useless.
38+
`mmap`, which may render the page cache produced during writing redundant (on `OpenBSD` e.g.) or/and
39+
useless.
3940

4041
## Goals
4142

@@ -153,9 +154,23 @@ adverse effects on CPU or disk I/O were observed.
153154

154155
## Alternatives
155156

156-
An alternative approach is to focus on enhancing user understanding of page cache behavior within
157+
- An alternative approach is to focus on enhancing user understanding of page cache behavior within
157158
Prometheus, helping them better interpret and adapt to it, without making any changes.
158159

160+
- [@dgl](https://github.com/dgl) has proposed using page cache hints to help with unpredictable
161+
memory reclaim:
162+
```
163+
Using posix_fadvise with POSIX_FADV_DONTNEED could be an option if it doesn't make sense
164+
to totally avoid the cache (there's also Linux specific memory management options like
165+
MADV_COLD, which could help for some of the container concerns to optimise which memory
166+
is reclaimed, although it wouldn't likely have as much user visible impact on the page cache).
167+
```
168+
169+
- The work [work](https://lore.kernel.org/linux-fsdevel/[email protected]/T/#cluster-upstream-ci)
170+
on introducing the `RWF_UNCACHED` flag for uncached buffered I/O has resumed, Provided no concessions
171+
or major changes are made solely to implement direct I/O support, direct I/O integration can always
172+
be challenged when `RWF_UNCACHED` is released and proven effective.
173+
159174
## Action Plan
160175

161176
* [ ] Implement the direct I/O writer and its utils and use it for chunks writing

0 commit comments

Comments
 (0)