• Andrew Morton's avatar
    [PATCH] vmscan.c scan rate fixes · 2332dc78
    Andrew Morton authored
    We've been futzing with the scan rates of the inactive and active lists far
    too much, and it's still not right (Anton reports interrupt-off times of over
    a second).
    
    - We have this logic in there from 2.4.early (at least) which tries to keep
      the inactive list 1/3rd the size of the active list.  Or something.
    
      I really cannot see any logic behind this, so toss it out and change the
      arithmetic in there so that all pages on both lists have equal scan rates.
    
    - Chunk the work up so we never hold interrupts off for more that 32 pages
      worth of scanning.
    
    - Make the per-zone scan-count accumulators unsigned long rather than
      atomic_t.
    
      Mainly because atomic_t's could conceivably overflow, but also because
      access to these counters is racy-by-design anyway.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    2332dc78
vmscan.c 32.7 KB