• Andrew Morton's avatar
    [PATCH] strip pagecache from to-be-reaped inodes · f9a316fa
    Andrew Morton authored
    With large highmem machines and many small cached files it is possible
    to encounter ZONE_NORMAL allocation failures.  This can be demonstrated
    with a large number of one-byte files on a 7G machine.
    
    All lowmem is filled with icache and all those inodes have a small
    amount of highmem pagecache which makes them unfreeable.
    
    The patch strips the pagecache from inodes as they come off the tail of
    the inode_unused list.
    
    I play tricks in there peeking at the head of the inode_unused list to
    pick up the inode again after running iput().  The alternatives seemed
    to involve more widespread changes.
    
    Or running invalidate_inode_pages() under inode_lock which would be a
    bad thing from a scheduling latency and lock contention point of view.
    f9a316fa
inode.c 31.3 KB