]> git.hungrycats.org Git - linux/commit
[PATCH] vmscan: zone pressure simplification and fix
authorAndrew Morton <akpm@osdl.org>
Sun, 31 Aug 2003 11:35:17 +0000 (04:35 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 31 Aug 2003 11:35:17 +0000 (04:35 -0700)
commitd867ca5c8eb176f54e75074b32157846ce89a21b
tree4cabcddc608b369ec0de2b49653e99fbdb0df4f2
parentb25bb6080a63c5a284ef9fc2ed3fa8fe75ce4f7c
[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.
include/linux/mmzone.h
mm/vmscan.c