On Sat, 24 Feb 2024 at 10:20, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > If somebody really cares about this kind of load, and cannot use > O_DIRECT for some reason ("I actually do want caches 99% of the > time"), I suspect the solution is to have some slightly gentler way to > say "instead of the throttling logic, I want you to start my writeouts > much more synchronously". > > IOW, we could have a writer flag that still uses the page cache, but > that instead of that > > balance_dirty_pages_ratelimited(mapping); I was *sure* we had had some work in this area, and yup, there's a series from 2019 by Konstantin Khlebnikov to implement write-behind. Some digging in the lore archives found this https://lore.kernel.org/lkml/156896493723.4334.13340481207144634918.stgit@buzz/ but I don't remember what then happened to it. It clearly never went anywhere, although I think something _like_ that is quite possibly the right thing to do (and I was fairly positive about the patch at the time). I have this feeling that there's been other attempts of write-behind in this area, but that thread was the only one I found from my quick search. I'm not saying Konstanti's patch is the thing to do, and I suspect we might want to actually have some way for people to say at open-time that "I want write-behind", but it looks like at least a starting point. But it is possible that this work never went anywhere exactly because this is such a rare case. That kind of "write so much that you want to do something special" is often such a special thing that using O_DIRECT is generally the trivial solution. Linus