Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20208
b: refs/heads/master
c: 80e4342
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Feb 12, 2006
1 parent df612be commit 7179ec3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 643a654540579b0dcc7a206a4a7475276a41aff0
refs/heads/master: 80e4342601abfafacb5f20571e40b56d73d10819
6 changes: 5 additions & 1 deletion trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,10 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc)
BUG_ON(PageActive(page));

sc->nr_scanned++;

if (!sc->may_swap && page_mapped(page))
goto keep_locked;

/* Double the slab pressure for mapped and swapcache pages */
if (page_mapped(page) || PageSwapCache(page))
sc->nr_scanned++;
Expand Down Expand Up @@ -1231,7 +1235,7 @@ refill_inactive_zone(struct zone *zone, struct scan_control *sc)
* Now use this metric to decide whether to start moving mapped memory
* onto the inactive list.
*/
if (swap_tendency >= 100)
if (swap_tendency >= 100 && sc->may_swap)
reclaim_mapped = 1;

while (!list_empty(&l_hold)) {
Expand Down

0 comments on commit 7179ec3

Please sign in to comment.