• Andrew Morton's avatar
    [PATCH] mark swapout pages PageWriteback() · 357f5a5e
    Andrew Morton authored
    Pages which are under writeout to swap are locked, and not
    PageWriteback().  So page allocators do not throttle against them in
    shrink_caches().
    
    This causes enormous list scans and general coma under really heavy
    swapout loads.
    
    One fix would be to teach shrink_cache() to wait on PG_locked for swap
    pages.  The other approach is to set both PG_locked and PG_writeback
    for swap pages so they can be handled in the same manner as file-backed
    pages in shrink_cache().
    
    This patch takes the latter approach.
    357f5a5e
swap_state.c 8.76 KB