• Andrew Morton's avatar
    [PATCH] Fix latencies during writeback · b345e6d2
    Andrew Morton authored
    When a throttled writer is performing writeback, and it encounters an inode
    which is already under writeback it is forced to wait on the inode.  So that
    process sleeps until whoever is writing it out finishes the writeout.
    
    Which is OK - we want to throttle that process, and another process is
    currently pumping data at the disk anyway.
    
    But in one situations the delays are excessive.  If one process is performing
    a huge linear write, other processes end up waiting for a very long time
    indeed.  It appears that this is because the writing process just keeps on
    hogging the CPU, returning to userspace, generating more dirty data, writing
    it out, sleeping in get_request_wait, etc.  All other throttled dirtiers get
    starved.
    
    So just remove the wait altogether if it is just a memory-cleansing writeout.
     The calling process will then throttle in balance_dirty_pages()'s call to
    blk_congestion_wait().
    b345e6d2
fs-writeback.c 15.9 KB