aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index eceac9f9032f..9a29901ad3b3 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -191,7 +191,7 @@ unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
191 shrinker->nr += delta; 191 shrinker->nr += delta;
192 if (shrinker->nr < 0) { 192 if (shrinker->nr < 0) {
193 printk(KERN_ERR "%s: nr=%ld\n", 193 printk(KERN_ERR "%s: nr=%ld\n",
194 __FUNCTION__, shrinker->nr); 194 __func__, shrinker->nr);
195 shrinker->nr = max_pass; 195 shrinker->nr = max_pass;
196 } 196 }
197 197
@@ -339,7 +339,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping,
339 if (PagePrivate(page)) { 339 if (PagePrivate(page)) {
340 if (try_to_free_buffers(page)) { 340 if (try_to_free_buffers(page)) {
341 ClearPageDirty(page); 341 ClearPageDirty(page);
342 printk("%s: orphaned page\n", __FUNCTION__); 342 printk("%s: orphaned page\n", __func__);
343 return PAGE_CLEAN; 343 return PAGE_CLEAN;
344 } 344 }
345 } 345 }
@@ -1299,6 +1299,9 @@ static unsigned long shrink_zones(int priority, struct zonelist *zonelist,
1299 * hope that some of these pages can be written. But if the allocating task 1299 * hope that some of these pages can be written. But if the allocating task
1300 * holds filesystem locks which prevent writeout this might not work, and the 1300 * holds filesystem locks which prevent writeout this might not work, and the
1301 * allocation attempt will fail. 1301 * allocation attempt will fail.
1302 *
1303 * returns: 0, if no pages reclaimed
1304 * else, the number of pages reclaimed
1302 */ 1305 */
1303static unsigned long do_try_to_free_pages(struct zonelist *zonelist, 1306static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
1304 struct scan_control *sc) 1307 struct scan_control *sc)
@@ -1347,7 +1350,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
1347 } 1350 }
1348 total_scanned += sc->nr_scanned; 1351 total_scanned += sc->nr_scanned;
1349 if (nr_reclaimed >= sc->swap_cluster_max) { 1352 if (nr_reclaimed >= sc->swap_cluster_max) {
1350 ret = 1; 1353 ret = nr_reclaimed;
1351 goto out; 1354 goto out;
1352 } 1355 }
1353 1356
@@ -1370,7 +1373,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
1370 } 1373 }
1371 /* top priority shrink_caches still had more to do? don't OOM, then */ 1374 /* top priority shrink_caches still had more to do? don't OOM, then */
1372 if (!sc->all_unreclaimable && scan_global_lru(sc)) 1375 if (!sc->all_unreclaimable && scan_global_lru(sc))
1373 ret = 1; 1376 ret = nr_reclaimed;
1374out: 1377out:
1375 /* 1378 /*
1376 * Now that we've scanned all the zones at this priority level, note 1379 * Now that we've scanned all the zones at this priority level, note