• Andrew Morton's avatar
    [PATCH] slab memory shrinking balancing fix · ed158dc1
    Andrew Morton authored
    The logic in shrink_slab tries to balance the proportion of slab which it
    scans against the proportion of pagecache which the caller scanned.  Problem
    is that with a large number of highmem LRU pages and a small number of lowmem
    LRU pages, the amount of pagecache scanning appears to be very small, so we
    don't push slab hard enough.
    
    The patch changes things so that for, say, a GFP_KERNEL allocation attempt we
    only consider ZONE_NORMAL and ZONE_DMA when calculating "what proportion of
    the LRU did the caller just scan".
    
    This will have the effect of shrinking slab harder in response to GFP_KERNEL
    allocations than for GFP_HIGHMEM allocations.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    ed158dc1
page_alloc.c 50.1 KB