aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8f71761bc4b7..1ff1a58e7c10 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -496,7 +496,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
496 page = lru_to_page(page_list); 496 page = lru_to_page(page_list);
497 list_del(&page->lru); 497 list_del(&page->lru);
498 498
499 if (TestSetPageLocked(page)) 499 if (!trylock_page(page))
500 goto keep; 500 goto keep;
501 501
502 VM_BUG_ON(PageActive(page)); 502 VM_BUG_ON(PageActive(page));
@@ -582,7 +582,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
582 * A synchronous write - probably a ramdisk. Go 582 * A synchronous write - probably a ramdisk. Go
583 * ahead and try to reclaim the page. 583 * ahead and try to reclaim the page.
584 */ 584 */
585 if (TestSetPageLocked(page)) 585 if (!trylock_page(page))
586 goto keep; 586 goto keep;
587 if (PageDirty(page) || PageWriteback(page)) 587 if (PageDirty(page) || PageWriteback(page))
588 goto keep_locked; 588 goto keep_locked;
@@ -1408,7 +1408,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
1408 if (sc->nr_scanned && priority < DEF_PRIORITY - 2) 1408 if (sc->nr_scanned && priority < DEF_PRIORITY - 2)
1409 congestion_wait(WRITE, HZ/10); 1409 congestion_wait(WRITE, HZ/10);
1410 } 1410 }
1411 /* top priority shrink_caches still had more to do? don't OOM, then */ 1411 /* top priority shrink_zones still had more to do? don't OOM, then */
1412 if (!sc->all_unreclaimable && scan_global_lru(sc)) 1412 if (!sc->all_unreclaimable && scan_global_lru(sc))
1413 ret = nr_reclaimed; 1413 ret = nr_reclaimed;
1414out: 1414out:
@@ -1979,7 +1979,7 @@ module_init(kswapd_init)
1979int zone_reclaim_mode __read_mostly; 1979int zone_reclaim_mode __read_mostly;
1980 1980
1981#define RECLAIM_OFF 0 1981#define RECLAIM_OFF 0
1982#define RECLAIM_ZONE (1<<0) /* Run shrink_cache on the zone */ 1982#define RECLAIM_ZONE (1<<0) /* Run shrink_inactive_list on the zone */
1983#define RECLAIM_WRITE (1<<1) /* Writeout pages during reclaim */ 1983#define RECLAIM_WRITE (1<<1) /* Writeout pages during reclaim */
1984#define RECLAIM_SWAP (1<<2) /* Swap pages out during reclaim */ 1984#define RECLAIM_SWAP (1<<2) /* Swap pages out during reclaim */
1985 1985