lkml.org 
[lkml]   [2017]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC] mm: implement write-behind policy for sequential file writes
From
Date
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.

\
 
 \ /
  Last update: 2017-10-02 13:56    [W:0.064 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site