• Andrew Morton's avatar
    [PATCH] strengthen the `incremental min' logic in the page · fee2b68d
    Andrew Morton authored
    Strengthen the `incremental min' logic in the page allocator.
    
    Currently it is allowing the allocation to succeed if the zone has
    free_pages >= pages_high.
    
    This was to avoid a lockup corner case in which all the zones were at
    pages_high so reclaim wasn't doing anything, but the incremental min
    refused to take pages from those zones anyway.
    
    But we want the incremental min zone protection to work.  So:
    
    - Only allow the allocator to dip below the incremental min if he
      cannot run direct reclaim.
    
    - Change the page reclaim code so that on the direct reclaim path,
      the caller can free pages beyond ->pages_high.  So if the incremental
      min test fails, the caller will go and free some more memory.
    
      Eventually, the caller will have freed enough memory for the
      incremental min test to pass against one of the zones.
    fee2b68d
vmscan.c 26.2 KB