• Andrew Morton's avatar
    [PATCH] shrink_slab: improved handling of GFP_NOFS allocations · edb41998
    Andrew Morton authored
    Currently, shrink_slab() will decide that it needs to scan a certain number of
    dentries, will call shrink_dcache_memory() requesting that this be done, and
    shrink_dcache_memory() will simply bale out without doing anything because the
    caller did not have __GFP_FS.
    
    This has the potential to disrupt our lovely pagecache-vs-slab balancing act. 
    So change things so that shrinker callouts can return -1, indicating that they
    baled out.  This way, shrink_slab can remember that this slab was owed a
    certain number of scannings and these will be correctly performed next time a
    __GFP_FS caller comes by.
    edb41998
vmscan.c 31.9 KB