Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338741
b: refs/heads/master
c: e986850
h: refs/heads/master
i:
  338739: 7d4c954
v: v3
  • Loading branch information
Rik van Riel authored and Linus Torvalds committed Dec 12, 2012
1 parent aa0be8f commit 0667a67
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 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: e749eb95531ac8349df47f8d46ce2641dcb16589
refs/heads/master: e9868505987a03a26a3979f27b82911ccc003752
15 changes: 13 additions & 2 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1679,13 +1679,24 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,

if (global_reclaim(sc)) {
free = zone_page_state(zone, NR_FREE_PAGES);
/* If we have very few page cache pages,
force-scan anon pages. */
if (unlikely(file + free <= high_wmark_pages(zone))) {
/*
* If we have very few page cache pages, force-scan
* anon pages.
*/
fraction[0] = 1;
fraction[1] = 0;
denominator = 1;
goto out;
} else if (!inactive_file_is_low_global(zone)) {
/*
* There is enough inactive page cache, do not
* reclaim anything from the working set right now.
*/
fraction[0] = 0;
fraction[1] = 1;
denominator = 1;
goto out;
}
}

Expand Down

0 comments on commit 0667a67

Please sign in to comment.