[PATCH] vmscan: zone pressure simplification and fix
The zone->pressure field is supposed to record the amount of reclaim pressure which this zone is under. We need this info so we know whether to unmap pages from pagetables right from the outset of a balance_pgdat() or try_to_free_pages() invokation. The problem with the current code is that the exponential average gets tugged around too much: as we perform the increasing-priority scan, the pressure metric is made artificially low by the early part of the scan. So instead what we do here is to record within the zone the scanning priority from the zone's previous scan. It is defined as the priority at which the zone achieved the "enough pages free" state. This prev_priority is used on the next scan for the do-we-need-to-be-unmapping-pages decision.
Showing
Please register or sign in to comment