• Andrew Morton's avatar
    [PATCH] writer throttling fix · 95b88300
    Andrew Morton authored
    The patch fixes a few problems in the writer throttling code.  Mainly
    in the situation where a single large file is being written out.
    
    That file could be parked on sb->locked_inodes due to pdflush
    writeback, and the writer throttling path coming out of
    balance_dirty_pages() forgot to look for inodes on ->locked_inodes.
    
    The net effect was that the amount of dirty memory was exceeding the
    limit set in /proc/sys/vm/dirty_async_ratio, possibly to the point
    where the system gets seriously choked.
    
    The patch removes sb->locked_inodes altogether and teaches the
    throttling code to look for inodes on sb->s_io as well as sb->s_dirty.
    
    Also, just leave unwritten dirty pages on mapping->io_pages, and
    unwritten dirty inodes on sb->s_io.  Putting them back onto
    ->dirty_pages and ->dirty_inodes was fairly pointless, given that both
    lists need to be looked at.
    95b88300
fs-writeback.c 16.4 KB