Re: [PATCH RFC] mm: implement write-behind policy for sequential file writes
From: Konstantin Khlebnikov
Date: Mon Oct 02 2017 - 07:55:36 EST
On 02.10.2017 14:23, Florian Weimer wrote:
On 10/02/2017 11:54 AM, Konstantin Khlebnikov wrote:
This patch implements write-behind policy which tracks sequential writes
and starts background writeback when have enough dirty pages in a row.
Does this apply to data for files which have never been written to disk before?
I think one of the largest benefits of the extensive write-back caching in Linux is that the cache is discarded if the file is deleted
before it is ever written to disk. (But maybe I'm wrong about this.)
Yes. I've mentioned that current policy is good for short-living files.
Write-behind keeps small files (<256kB) in cache and writes files smaller
than 1MB in background, synchronous writes starts only after 1MB.
But in other hand such files have to be written if somebody calls sync or
metadata changes are serialized by journal transactions, or memory pressure
flushes them to the disk. So this caching is very unstable and uncertain.
In some cases caching makes whole operation much slower because actual disk
write starts later than could be.