Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127583
b: refs/heads/master
c: eeee9a8
h: refs/heads/master
i:
  127581: 0256977
  127579: 0ab1ec0
  127575: 0b6b242
  127567: 3fc64e6
  127551: eb16623
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Jan 8, 2009
1 parent 40cefaa commit 9b29fff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 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: c9f299d9862deadf9fbee3ca28d915fdb006975a
refs/heads/master: eeee9a8cd1e93c8b94e7788790fa9e2f8910c779
15 changes: 9 additions & 6 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,13 +1376,16 @@ static void get_scan_ratio(struct zone *zone, struct scan_control *sc,
zone_nr_pages(zone, sc, LRU_INACTIVE_ANON);
file = zone_nr_pages(zone, sc, LRU_ACTIVE_FILE) +
zone_nr_pages(zone, sc, LRU_INACTIVE_FILE);
free = zone_page_state(zone, NR_FREE_PAGES);

/* If we have very few page cache pages, force-scan anon pages. */
if (unlikely(file + free <= zone->pages_high)) {
percent[0] = 100;
percent[1] = 0;
return;
if (scan_global_lru(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 <= zone->pages_high)) {
percent[0] = 100;
percent[1] = 0;
return;
}
}

/*
Expand Down

0 comments on commit 9b29fff

Please sign in to comment.