• Marwan Tanager's avatar
    Replace the periodic page reclaiming code with a LRU caching algorithm. · cb18fe86
    Marwan Tanager authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
    
    
    This patch implements a page cache that is invalidated in a LRU fashion.
    
    Pages are added to the cache as soon as they become visible. When the cache is
    full and a new page that isn't in the cache becomes visible, the least recently
    viewed page in the cache is evicted from memory and the new one takes it's
    place.
    
    The cache size is configurable using the page-cache-size configuration
    variable, with a default value of 15 pages. Very large values for the cache
    size are not recommended, though, as it will stress the system memory out.
    
    The old periodic page reclaiming code is no longer necessary with this patch,
    so I removed it.
    
    Special thanks to Ignas Anikevičius, and Sebastian Ramacher for the
    inspirations.
    Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
    cb18fe86