• Andrew Morton's avatar
    [PATCH] try to remove buffer_heads from to-be-reaped inodes · deda1b5e
    Andrew Morton authored
    Stephen Tweedie reports a 2.4.7 problem in which kswapd is chewing lots
    of CPU trying to reclaim inodes which are pinned by buffer_heads at
    i_dirty_buffers.
    
    This can only happen when there's memory pressure on ZONE_HIGHMEM - the
    2.4 kernel runs shrink_icache_memory in that case as well.  But there's
    no reclaim pressure on ZONE_NORMAL so the VM is never running
    try_to_free_buffers() against the ZONE_NORMAL buffers which are pinning
    the inodes.
    
    The 2.5 kernel also runs the slab shrinkers in response to ZONE_HIGHMEM
    pressure.  This may be wrong - still thinking about that.
    
    This patch arranges for prune_icache to try to remove the inode's buffers
    when the inode is to be reclaimed.
    
    It also changes inode_has_buffers() and the other inode-buffer-list
    functions to look at inode->i_data, not inode->i_mapping.  The latter
    was wrong.
    deda1b5e
buffer.c 69.4 KB