aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/vmscan.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 5db32fdfaf39..e1c64230ffdd 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -443,6 +443,10 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc)
443 BUG_ON(PageActive(page)); 443 BUG_ON(PageActive(page));
444 444
445 sc->nr_scanned++; 445 sc->nr_scanned++;
446
447 if (!sc->may_swap && page_mapped(page))
448 goto keep_locked;
449
446 /* Double the slab pressure for mapped and swapcache pages */ 450 /* Double the slab pressure for mapped and swapcache pages */
447 if (page_mapped(page) || PageSwapCache(page)) 451 if (page_mapped(page) || PageSwapCache(page))
448 sc->nr_scanned++; 452 sc->nr_scanned++;
@@ -1231,7 +1235,7 @@ refill_inactive_zone(struct zone *zone, struct scan_control *sc)
1231 * Now use this metric to decide whether to start moving mapped memory 1235 * Now use this metric to decide whether to start moving mapped memory
1232 * onto the inactive list. 1236 * onto the inactive list.
1233 */ 1237 */
1234 if (swap_tendency >= 100) 1238 if (swap_tendency >= 100 && sc->may_swap)
1235 reclaim_mapped = 1; 1239 reclaim_mapped = 1;
1236 1240
1237 while (!list_empty(&l_hold)) { 1241 while (!list_empty(&l_hold)) {