• Andrew Morton's avatar
    [PATCH] batched removal of pages from the LRU · 008f707c
    Andrew Morton authored
    Convert all the bulk callers of lru_cache_del() to use the batched
    pagevec_lru_del() function.
    
    Change truncate_complete_page() to not delete the page from the LRU.
    Do it in page_cache_release() instead.  (This reintroduces the problem
    with final-release-from-interrupt.  THat gets fixed further on).
    
    This patch changes the truncate locking somewhat.  The removal from the
    LRU now happens _after_ the page has been removed from the
    address_space and has been unlocked.  So there is now a window where
    the shrink_cache code can discover the to-be-freed page via the LRU
    list.  But that's OK - the page is clean, its buffers (if any) are
    clean.  It's not attached to any mapping.
    008f707c
swap.c 5.48 KB