• Lee Schermerhorn's avatar
    Ramfs and Ram Disk pages are unevictable · ba9ddf49
    Lee Schermerhorn authored
    Christoph Lameter pointed out that ram disk pages also clutter the LRU
    lists.  When vmscan finds them dirty and tries to clean them, the ram disk
    writeback function just redirties the page so that it goes back onto the
    active list.  Round and round she goes...
    
    With the ram disk driver [rd.c] replaced by the newer 'brd.c', this is no
    longer the case, as ram disk pages are no longer maintained on the lru.
    [This makes them unmigratable for defrag or memory hot remove, but that
    can be addressed by a separate patch series.] However, the ramfs pages
    behave like ram disk pages used to, so:
    
    Define new address_space flag [shares address_space flags member with
    mapping's gfp mask] to indicate that the address space contains all
    unevictable pages.  This will provide for efficient testing of ramfs pages
    in page_evictable().
    
    Also provide wrapper functions to set/test the unevictable state to
    minimize #ifdefs in ramfs driver and any other users of this facility.
    
    Set the unevictable state on address_space structures for new ramfs
    inodes.  Test the unevictable state in page_evictable() to cull
    unevictable pages.
    
    These changes depend on [CONFIG_]UNEVICTABLE_LRU.
    
    [riel@redhat.com: undo the brd.c part]
    Signed-off-by: default avatarLee Schermerhorn <lee.schermerhorn@hp.com>
    Signed-off-by: default avatarRik van Riel <riel@redhat.com>
    Debugged-by: default avatarNick Piggin <nickpiggin@yahoo.com.au>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    ba9ddf49
Name
Last commit
Last update
..
Makefile Loading commit data...
file-mmu.c Loading commit data...
file-nommu.c Loading commit data...
inode.c Loading commit data...
internal.h Loading commit data...