path: root/mm/workingset.c
diff options
authorJohannes Weiner <>2020-06-03 16:03:00 -0700
committerLinus Torvalds <>2020-06-03 20:09:49 -0700
commit264e90cc07f177adec17ee7cc154ddaa132f0b2d (patch)
tree8dc5c7dd55abdaa243e64cfc9f472691b77da74d /mm/workingset.c
parentfbbb602e40c270e884bc545161b238074b20aaae (diff)
mm: only count actual rotations as LRU reclaim cost
When shrinking the active file list we rotate referenced pages only when they're in an executable mapping. The others get deactivated. When it comes to balancing scan pressure, though, we count all referenced pages as rotated, even the deactivated ones. Yet they do not carry the same cost to the system: the deactivated page *might* refault later on, but the deactivation is tangible progress toward freeing pages; rotations on the other hand cost time and effort without getting any closer to freeing memory. Don't treat both events as equal. The following patch will hook up LRU balancing to cache and anon refaults, which are a much more concrete cost signal for reclaiming one list over the other. Thus, remove the maybe-IO cost bias from page references, and only note the CPU cost for actual rotations that prevent the pages from getting reclaimed. Signed-off-by: Johannes Weiner <> Signed-off-by: Andrew Morton <> Acked-by: Minchan Kim <> Acked-by: Michal Hocko <> Cc: Joonsoo Kim <> Cc: Rik van Riel <> Link: Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/workingset.c')
0 files changed, 0 insertions, 0 deletions