[lkml]   [2012]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM
When a reclaim scanner is doing its final scan before giving up and
there is swap space available, pay no attention to swappiness
preference anymore. Just swap.

Note that this change won't make too big of a difference for general
reclaim: anonymous pages are already force-scanned when there is only
very little file cache left, and there very likely isn't when the
reclaimer enters this final cycle.

Signed-off-by: Johannes Weiner <>
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 3874dcb..6e53446 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1751,7 +1751,7 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
unsigned long scan;

scan = get_lru_size(lruvec, lru);
- if (sc->priority || noswap || !vmscan_swappiness(sc)) {
+ if (sc->priority || noswap) {
scan >>= sc->priority;
if (!scan && force_scan)

 \ /
  Last update: 2012-12-12 23:21    [W:0.323 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site