Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356488
b: refs/heads/master
c: 11d16c2
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Feb 24, 2013
1 parent 8d37749 commit a2698c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: 10316b313cbde4b778c3d1b4b2fe2adbcbe84a48
refs/heads/master: 11d16c25bbf7a3b7a43d7472e175cdd52961757d
12 changes: 7 additions & 5 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1713,13 +1713,15 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
file = get_lru_size(lruvec, LRU_ACTIVE_FILE) +
get_lru_size(lruvec, LRU_INACTIVE_FILE);

/*
* If it's foreseeable that reclaiming the file cache won't be
* enough to get the zone back into a desirable shape, we have
* to swap. Better start now and leave the - probably heavily
* thrashing - remaining file pages alone.
*/
if (global_reclaim(sc)) {
free = zone_page_state(zone, NR_FREE_PAGES);
free = zone_page_state(zone, NR_FREE_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;
Expand Down

0 comments on commit a2698c3

Please sign in to comment.