• Andrew Morton's avatar
    [PATCH] per-zone-LRU · e6f0e61d
    Andrew Morton authored
    Replace the global page LRUs with per-zone LRUs.
    
    This fixes the failure described at
    http://mail.nl.linux.org/linux-mm/2002-08/msg00049.html
    
    It will also fixes the problem wherein a search for a reclaimable
    ZONE_NORMAL page will undesirably move aged ZONE_HIGHMEM pages to the
    head of the inactive list.  (I haven't tried to measure any benefit
    from this aspect).
    
    It will also reduces the amount of CPU spent scanning pages in page
    reclaim. I haven't instrumented this either.
    
    This is a minimal conversion - the aging and reclaim logic is left
    unchanged, as far as is possible.
    
    I was bitten by the "incremental min" logic in __alloc_pages again.
    There's a state in which the sum-of-mins exceeds zone->pages_high.  So
    we call into try_to_free_pages(), which does nothing at all (all zones
    have free_pages > pages_high).  The incremental min is unchanged and
    the VM locks up.
    
    This was fixed in __alloc_pages: if zone->free_pages is greater than
    zone->pages_high then just go and grab a page.
    e6f0e61d
vmscan.c 18.3 KB